Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Promremotecli

16 Jun 2022 »

https://github.com/m3dbx/prometheus_remote_client_golang

install golang

https://go.dev/doc/tutorial/getting-started

wget https://go.dev/dl/go1.18.3.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz

~/.bashrc

export PATH="/usr/local/go/bin:$PATH"
git clone https://github.com/m3dbx/prometheus_remote_client_golang.git
cd prometheus_remote_client_golang/
go  build -o promremotecli ./cmd/promremotecli/
./promremotecli -u $endpoint -h "Authorization: Basic $basicauth" -t __name__:metric_dummy -t job:promremotecli -d now,100
./promremotecli -u $endpoint -h "Authorization: Basic $basicauth" -t __name__:metric_dummy -t job:promremotecli -d now,110
./promremotecli -u $endpoint -h "Authorization: Basic $basicauth" -t __name__:metric_dummy -t job:promremotecli -d now,120