Absent doesn't return labels because there aren't any. Add the labels you
need for the alert identification in the labels section.

--Matt

On Thu, Apr 15, 2021, 07:50 fiala...@gmail.com <fialamar...@gmail.com>
wrote:

> Hi,
>
> I have cpu usage exporter with these metrics for every running processes.
> process_cpu_usage{command="/usr/bin/rsyslog -n"} 0.12
>
> I would like to use this exporter for monitoring if process is running.
>
> I've tried to use absent -  but with regexp match it doesn't return
> "command" label. And I need it for alert description
> Eg:
> absent(process_cpu_usage{command=~"/usr/sbin/rsyslogd.*", instance="
> my-server.com"})
>
> Is there a way how to add label to vector(0)?
>
> Or do you know any other way, how to solve it?
>
> Thank you.
>
>
> --
> 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 prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/42c7e7dc-e32b-42f8-b7e9-a19d2ec0f485n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/42c7e7dc-e32b-42f8-b7e9-a19d2ec0f485n%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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAGyBzcyEsX2bm_AQP3yTtq5YyACcxx5P52ijoNE4Eor%2Bb4O%2BnQ%40mail.gmail.com.

Reply via email to