1. rule.yml:
groups:
- name: test_alert
  rules:

  - alert: xxx-shutdown
    expr:  count(up{group="tty",job="test101"} == 0 ) == 1
    for: 30s
    labels:
      severity: emergency
      reporter: prometheus
    annotations:
      summary:  "{{ $labels.instance }} shutdown"
      description: "{{ $labels.group }} of job {{ $labels.job}} shutdown"

2. get alert message like below:

[FIRING:1] 
Alerts Firing

[EMERGENCY]  shutdown
Description: of job shutdown

Graph: 📈

Details:

alertname: xxx-shutdown
reporter: prometheus


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6ef1df3d-bb16-4c28-9eca-6aa3ceb8de1an%40googlegroups.com.

Reply via email to