Thanks, Julian. Btw., you could change the "=~" to just "=" because that regex is just doing a full string equality match anyway. >> Thanks for pointing it out. I recently removed 2-3 jobs from this alert and forgot to remove the regex matcher.
> > On Fri, Apr 17, 2020 at 7:06 PM Yagyansh S. Kumar <[email protected] > <javascript:>> wrote: > >> Hi. I am using Blackbox exporter to monitor my Application's and LB's >> HealthCheck URLs. >> >> My alert for this looks like below: >> >> - alert: ServiceHTTPChecks >> expr: probe_success{job=~"blackbox_Service-HealthChecks"} == 0 >> for: 2m >> labels: >> severity: "CRITICAL" >> annotations: >> summary: "Healthcheck *{{ $labels.checkname }}* failed." >> description: *I NEED THE RESPONSE CODE THAT THE INSTANCE HAS AT >> THIS POINT OF TIME* >> identifier: "*URL:* `{{ $labels.instance }}`, *Cluster:* `{{ >> $labels.cluster }}`, *node:* `{{ $labels.node }}` " >> >> Whenever the probe_success is 0, I also want the response code for my >> instance at that time which probe_success itself does not have and is >> provided by probe_http_status_code. >> My question is can I append the response code from the >> probe_http_status_code query to the labels of probe_success using the >> group_left? >> If no, what other way is there to get the response code printed in my >> alert whenever my URL is down. >> Thanks in advance! >> >> -- >> 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] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/prometheus-users/2447ca8c-c2a0-4bb7-bcf4-23fed0c30654%40googlegroups.com >> >> <https://groups.google.com/d/msgid/prometheus-users/2447ca8c-c2a0-4bb7-bcf4-23fed0c30654%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/43e83fb9-2f3b-470d-96cc-53a85da0b3d2%40googlegroups.com.

