English 中文(简体)
如何在红豆的仪表板上 列出布洛修斯的警示?
原标题:How to list prometheus alerts in a dashboard in grafana?
我在普罗米修斯建立警报的堆叠。 这些警报列在格拉法纳 > 警报 > 警报规则下。 我想创建一个仪表板, 我可以用简单的方式查看警报。 就像正常和射击状态一样 。
最佳回答
You can query alert in firing or pending status with metric ALERTS. It will return metric of the following format: ALERTS{alertname="Watchdog", alertstate="firing", severity="warning"} 1 But, as far as I know, you cannot query alerts in passive state. If you really want all alerts, you could get them from rules with the request to api/v1/rules?type=alert, but you ll need JSON plugin for this.
问题回答
Steps: Install Plugin Json API in Grafana. "Versions above 1.3.3 had some issues." Create Data Source in Grafana .




相关问题
Prometheus Java client manually exposing prometheus end point

I have a spring boot application where for certain legacy reasons I cannot use spring actuator. I was able to expose a prometheus end point and see a lot of default metrics. But I am not able to see ...

Grafana interval variable: minimum threshold function?

I m adding an interval variable to a dashboard to allow averaging some prometheus time series over an interval to get cleaner looking graphs. But I want to leave in the base sample rate (15s) so the ...

How to specify time range in {aggregate}_over_time?

I have a Grafana chart that makes use of the sum_over_time(data_source[$__interval]) and count_over_time(data_source[$__interval]) command in Prometheus. Normally, it is working fine. But, the ...

how to regex path in prometheus relabel_configs

i have a metric and label like this: namedprocess_namegroup_num_procs{groupname:"/data/home/user01/app.service.1/service"}, i want to get the last field: service, and the number in last but ...

Omit labels from series results PromQL

Suppose I write a basic PromQL query like this Query: kube_deployment_spec_replicas{} Result: kube_deployment_spec_replicas{deployment="mydeployment",endpoint="myendpoint",instance="myinstance",...

Last known timestamp of a metric sample?

How do I get the timestamp of the last known sample of a metric? I want to display a table that lists when was the last time a specific service was running before it disappeared (died or whatever). ...

热门标签