Difference between revisions of "Prometheus: alert:"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
  
 
* https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
 
* https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/
 +
 +
groups:
 +
- name: example
 +
  rules:
 +
  - alert: HighRequestLatency
 +
    expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
 +
    for: 10m
 +
    labels:
 +
      severity: page
 +
    annotations:
 +
      summary: High request latency
 +
  
 
<pre>
 
<pre>

Revision as of 07:53, 23 September 2022

groups:
- name: example
  rules:
  - alert: HighRequestLatency
    expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
    for: 10m
    labels:
      severity: page
    annotations:
      summary: High request latency



 alert: InstanceDown
 expr: up == 0
 for: 5m
 labels:
   severity: page
 annotations:
   summary: "Instance {{$labels.instance}} down"
   description: "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes."

Related

See also

Advertising: