This commit is contained in:
linge
2023-03-13 23:23:34 +08:00
commit 8c1d7aa660
5 changed files with 185 additions and 0 deletions

12
prometheus/alert.yml Normal file
View File

@ -0,0 +1,12 @@
groups:
- name: Prometheus alert
rules:
# 对任何实例超过30秒无法联系的情况发出警报
- alert: 服务告警
expr: up == 0
for: 30s
labels:
severity: critical
annotations:
instance: "{{ $labels.instance }}"
description: "{{ $labels.job }} 服务已关闭"