Thanks, Brian, Mat for helping me. If I need to add more parameters to
search, e.g = job=jmx_exporter, will this work then?
curl -g 'localhost:9090/api/v1/series?match[]=metric_name{job='jmx_exporter'
&& instanceAlias="node0002"}'
On Thursday, June 18, 2020 at 8:12:12 PM UTC+5:30, Brian Candler wrote:
>
> 1. Use curl -g to stop it interpreting special characters, like curly
> braces
> 2. If you want double quotes inside double quotes, then they must be
> preceded by a backslash: \"
>
> It's simpler to use single quotes on the outside:
>
> curl -g
> 'localhost:9090/api/v1/series?match[]=metric_name{instanceAlias="node0002"}'
>
> You may also find it easier to use "promtool query" (and you get prettier
> output too)
>
> /opt/prometheus/promtool query instant http://localhost:9090
> 'metric_name{instanceAlias="node0002"}'
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/5fb3b294-7fa0-4435-8beb-10b71779656bo%40googlegroups.com.