3 years ago
OpenMetrics: How to use a Label Expression with more than one variable value?
Greetings;
I am using an OpenMetrics datasource to scrape HAProxy stats from a Prometheus exporter. This works well for datapoints such as:
nova_frontend_connections_total{frontend="stats"
...for which I construct a Datapoint using "Label Expression", "frontend=##WILDVALUE##."
I have a series of stats with two variables and can't work out how to implement those such as the following:
ova_frontend_http_responses_total{code="1xx",frontend="acme"} 0 nova_frontend_http_responses_total{code="1xx",frontend="acme-ca"} 0 nova_frontend_http_responses_total{code="1xx",frontend="nova-ssl-1920"} 0 nova_frontend_http_responses_total{code="1xx",frontend="stats"} 0 nova_frontend_http_responses_total{code="2xx",frontend="acme"} 0 nova_frontend_http_responses_total{code="2xx",frontend="acme-ca"} 0 nova_frontend_http_responses_total{code="2xx",frontend="nova-ssl-1920"} 0 nova_frontend_http_responses_total{code="2xx",frontend="stats"} 990 nova_frontend_http_responses_total{code="3xx",frontend="acme"} 0 nova_frontend_http_responses_total{code="3xx",frontend="acme-ca"} 0 nova_frontend_http_responses_total{code="3xx",frontend="nova-ssl-1920"} 0 nova_frontend_http_responses_total{code="3xx",frontend="stats"} 0 nova_frontend_http_responses_total{code="4xx",frontend="acme"} 0 nova_frontend_http_responses_total{code="4xx",frontend="acme-ca"} 0 nova_frontend_http_responses_total{code="4xx",frontend="nova-ssl-1920"} 1 nova_frontend_http_responses_total{code="4xx",frontend="stats"} 0 nova_frontend_http_responses_total{code="5xx",frontend="acme"} 0 nova_frontend_http_responses_total{code="5xx",frontend="acme-ca"} 0 nova_frontend_http_responses_total{code="5xx",frontend="nova-ssl-1920"} 0 nova_frontend_http_responses_total{code="5xx",frontend="stats"} 0
Any guidance would be helpful, thanks!