Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Status page from prometheus alerts?

Is there anyway we can create a status page with data from prometheus alerts? Status pages should be something similar to status.io page but the data should be from prometheus.

like image 521
rashidcmb Avatar asked May 03 '18 13:05

rashidcmb


People also ask

How often does Prometheus check alerts?

The Alert Lifecycle Prometheus is configured to scrape metrics every 20 seconds, and the evaluation interval is 1 minute.


1 Answers

I tried a lot of tools but couldn't find any which suits my requirements. For anyone looking for a simple solution, the best bet is Prometheus api.

Prometheus api will be like

http://prometheus-weburl/prometheus/api/v1/query?query=ALERTS{alertname="InstanceDown"}

Traversing through the output json for return values can be used to update innerHTML if used with JavaScript.

like image 57
rashidcmb Avatar answered Oct 18 '22 03:10

rashidcmb