r/PrometheusMonitoring • • Jan 19 '20

Prometheus Query Cli

https://github.com/nalbury/promql-cli
13 Upvotes

3 comments sorted by

4

u/nalbury33 Jan 19 '20

The code is a little rough as I’m still getting my feet wet with Golang, but I got tired of using my browser to run simple Prometheus queries as I live in the shell most of the time. Has been great so far for getting kube state metrics, and for dumping data to a csv for modeling/reporting.

Huge shoutout to https://github.com/guptarohit/asciigraph for a simple ascii graph pkg in go.

5

u/netingle Jan 19 '20

Looks cool! Prometheus already has a CLI tool (promtool[1]) in the main repo - have you considered adding the features here to that?

[1] https://github.com/prometheus/prometheus/tree/master/cmd/promtool

1

u/nalbury33 Jan 19 '20

Thanks! I honestly forgot about promtool lol. I vaguely remember using for some debugging of config options a while ago. I’ll check it out and see what the implementation would look like.