Difference between revisions of "Prometheus: alert:"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
  groups:
 
  groups:
 
  - name: example
 
  - name: example
   [[rules:]]
+
   [[Prometheus, rules:|rules:]]
 
   - alert: HighRequestLatency
 
   - alert: HighRequestLatency
 
     expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
 
     expr: job:request_latency_seconds:mean5m{job="myjob"} > 0.5
Line 31: Line 31:
 
* <code>[[expr:]]</code>
 
* <code>[[expr:]]</code>
 
* [[Go template]]: https://pkg.go.dev/text/template
 
* [[Go template]]: https://pkg.go.dev/text/template
 +
* <code>[[rule files:]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 08:09, 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[edit]

See also[edit]

Advertising: