This is a Prometheus HTTP API GET call for one query, i.e, "up".
http://localhost:port/api/v1/query?query=up[1m]
Now, if I want to send multiple queries (not only "up", but other queries as well), what will be the syntax?
You can hack your way around it as long as you're not too picky about what you want to query. E.g. if you want to query all up time series and all cpu_utilization time series, you can use something like this:
{__name__=~"up|cpu_utilization"}
It will even work with range queries, as long as you want the same range for all time series:
{__name__=~"up|cpu_utilization"}[1m]
But not if you want different time ranges or want to add selectors (e.g. there's no easy way of combining up{job="prometheus} and cpu_utilization{instance="foo:8080"}).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With