2

2 Node is UP and Running and I want to get alerts if both nodes get down, for that I am writing queries in Prometheus but getting an error

up{service="brokerA-metrics"} and {service="brokerB-metrics"} == 1

I am getting NO DATA POINT

up({service="brokerA-metrics"} and {service="brokerB-metrics"}) == 1

Error executing query: parse error at char 4: unknown function with name "up"

What is the solution for this?

4

1 回答 1

0

你可以做这样的事情

(up{service="brokerA-metrics"} + 忽略(service) {service="brokerB-metrics"}) == 0

或者

...) < 1

如果您想在只有一个节点关闭时触发警报

于 2018-11-23T11:45:37.603 回答