On 02 May 06:19, Brian Candler wrote:
> Show individually the results of querying (in the prometheus console,
> non-graphical view)
>
> health_check{job="platform-events-db", cluster="loco-prod"}
>
> up{job="platform-events-db", cluster="loco-prod"}
>
> Do they have exactly the same label sets? If not, you'll have to add
> on(...) or ignoring(...), or use group_left.
>
> Also note: the query you have shown will only "fill in the gaps" for
> health_check if the scrape failed entirely, i.e. when up == 0. If "up" was
> 1, but health_check was missing, it won't fill in the gap. If that's the
> case, you could try:
>
> health_check{...} or up{...} * 0
>
> Final note: I would be *very wary* about doing this sort of data
> manipulation. There is a critical difference between a health check
> failing, and a health check not running at all (or its result being lost).
> If you confuse these two things, people may draw the wrong conclusions from
> the data.I agree that this can be done at grafana level -- null as zero. In PromQL, that would be: health_check or 0*count_over_time(health_check[30m]) > > -- > 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/58f2a1d9-1970-43cb-b8ab-84ae072c12cc%40googlegroups.com. -- (o- Julien Pivotto //\ Open-Source Consultant V_/_ Inuits - https://www.inuits.eu -- 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/20200502204421.GA9016%40oxygen.
signature.asc
Description: PGP signature

