- What Grafana version and what operating system are you using?
Grafana Cloud. Mostly irrelevant, if we can solve with promql or adjusting our data model.
- What are you trying to achieve?
given series like this,
one_metric{svcslug="service_a",required_for_service_health="true",labels="I_want"} 0
two_metric{svcslug="service_a",required_for_service_health="true",other_labels="I_want"} 1
one_metric{svcslug="service_b",required_for_service_health="true",labels="I_want"} 0
three_metric{svcslug="service_b",required_for_service_health="true",other_labels="I_want"} 0
With values akin to nagios (0=health, 1=warn, 2=critical)…
I can find any service with one or more unhealthy series for a dashboard or alert. Great! But… missing metrics?
Losing signal on any series matching {__name__=~".+",required_for_service_health="true"}
is what I am looking for. What if one_metric{svcslug="service_b",required_for_service_health="true",labels="I_want"}
disappears? How do I identify this (the metric name, and labels, are all helpful - I do not want to group by anything ideally)?
I’ve seen a number of answers using count, offset, absent, etc., but, none seem to work with this data model. I could certainly shift the data model, but I’m not sure
- How are you trying to achieve it?
promql presumably. I’ve tried many variations on absent count with offset unless, etc, that you find when searching.
I could in theory change the data model, this is mostly a POC. Perhaps adding a label that has the svcslug and differentiators comprised of data from labels that I care about - I suspect I will have to go this route, but would really prefer to avoid it.
Apologies if this is something simple that I am just missing in my inexperience - thanks!