[prometheus-users] Re: how to make sure a metric is to be checked is "there"

2023-04-28 Thread Brian Candler
On Friday, 28 April 2023 at 03:41:19 UTC+1 Christoph Anton Mitterer wrote: You could start with: expr: up{job="myjob"} == 1 unless on (instance) my_metric Ah. I see. I guess one should use on(...) rather than ignoring(...) because one doesn't really know which labels may get added, right?

[prometheus-users] Re: how to make sure a metric is to be checked is "there"

2023-04-27 Thread Christoph Anton Mitterer
Hey again. On Wednesday, April 26, 2023 at 9:35:32 AM UTC+2 Brian Candler wrote: > expr: up{job="myjob"} == 1 unless my_metric Beware with that, that it will only work if the labels on both 'up' and 'my_metric' match exactly. If they don't, then you can either use on(...) to specify the set

[prometheus-users] Re: how to make sure a metric is to be checked is "there"

2023-04-26 Thread Brian Candler
> expr: up{job="myjob"} == 1 unless my_metric Beware with that, that it will only work if the labels on both 'up' and 'my_metric' match exactly. If they don't, then you can either use on(...) to specify the set of labels which match, or ignoring(...) to specify the ones which don't. You

[prometheus-users] Re: how to make sure a metric is to be checked is "there"

2023-04-25 Thread Christoph Anton Mitterer
On Tuesday, April 25, 2023 at 9:32:25 AM UTC+2 Brian Candler wrote: I think you would have basically the same problem with Icinga unless you have configured Icinga with a list of RAID controllers which should be present on a given device, or a list of drives which should be present in a

[prometheus-users] Re: how to make sure a metric is to be checked is "there"

2023-04-25 Thread Brian Candler
I think you would have basically the same problem with Icinga unless you have configured Icinga with a list of RAID controllers which should be present on a given device, or a list of drives which should be present in a particular RAID array. > I mean I can of course check e.g. > expr: up == 0