absent(nonexistent{job="myjob",instance=~".*"}) why miss label instance

40 views
Skip to first unread message

5765...@qq.com

unread,
Jul 20, 2020, 1:36:50 AM7/20/20
to Prometheus Users
absent(nonexistent{job="myjob",instance=~".*"}) why miss label instance?

Brian Candler

unread,
Jul 20, 2020, 2:29:22 AM7/20/20
to Prometheus Users
1. There are an infinite number of possibilities which could match instance=~".*"

2. The result of that query is vector of timeseries.  Each timeseries must have concrete labels like foo="bar", whereas foo=~"bar|baz" is a PromQL querying construct only.  That is, it's not a label, it's an expression that selects labels.

5765...@qq.com

unread,
Jul 20, 2020, 2:47:48 AM7/20/20
to Prometheus Users
Our requirement is the alarm for up metric, using absent(up{job="myjob",instance=~ ".* "}). but you won't get the instance information. Do you have any other suggestions?

在 2020年7月20日星期一 UTC+8下午2:29:22,Brian Candler写道:

Julien Pivotto

unread,
Jul 20, 2020, 2:59:06 AM7/20/20
to 5765...@qq.com, Prometheus Users
up offet 1h unless up


That would fire for an hour with instance label.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1c3e069d-79d5-442b-9671-b92d810bda0eo%40googlegroups.com.

5765...@qq.com

unread,
Jul 20, 2020, 8:34:10 AM7/20/20
to Prometheus Users
What  mean?

在 2020年7月20日星期一 UTC+8下午2:59:06,Julien Pivotto写道:
up offet 1h unless up


That would fire for an hour with instance label.

Le lun. 20 juil. 2020 à 08:47, 5765...@qq.com <5765...@qq.com> a écrit :
Our requirement is the alarm for up metric, using absent(up{job="myjob",instance=~ ".* "}). but you won't get the instance information. Do you have any other suggestions?

在 2020年7月20日星期一 UTC+8下午2:29:22,Brian Candler写道:
1. There are an infinite number of possibilities which could match instance=~".*"

2. The result of that query is vector of timeseries.  Each timeseries must have concrete labels like foo="bar", whereas foo=~"bar|baz" is a PromQL querying construct only.  That is, it's not a label, it's an expression that selects labels.

--
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 promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages