Files
2026-07-09 10:17:50 +08:00

58 lines
2.1 KiB
Plaintext

groups:
- name: single_port_service_alarm
rules:
########################### 严重告警 Critical ###########################
# 22 sshd 远程登录端口
- alert: Port_22_SSHD_Down
expr: probe_success{port="22"} == 0
for: 10s
labels:
severity: critical
service: sshd
annotations:
summary: "主机{{$labels.instance}} SSH登录端口{{$labels.port}}断开"
description: "端口{{$labels.port}} sshd服务异常,无法远程登录服务器,紧急处理!"
# 111 rpcbind RPC注册服务
- alert: Port_111_Rpcbind_Down
expr: probe_success{port="111"} == 0
for: 10s
labels:
severity: critical
service: rpcbind
annotations:
summary: "主机{{$labels.instance}} RPC注册端口{{$labels.port}}断开"
description: "端口{{$labels.port}} rpcbind异常,所有NFS/RPC相关服务全部失效,业务挂载会报错!"
# 2049 NFS存储端口
- alert: Port_2049_NFS_Down
expr: probe_success{port="2049"} == 0
for: 10s
labels:
severity: critical
service: nfs
annotations:
summary: "主机{{$labels.instance}} NFS存储端口{{$labels.port}}断开"
description: "端口{{$labels.port}} NFS内核端口无法连通,所有业务NFS读写中断!"
# 9100 node_exporter监控采集
- alert: Port_9100_NodeExporter_Down
expr: probe_success{port="9100"} == 0
for: 10s
labels:
severity: critical
service: node_exporter
annotations:
summary: "主机{{$labels.instance}} 监控采集端口{{$labels.port}}断开"
description: "端口{{$labels.port}} node_exporter离线,主机资源指标无法采集,无监控数据!"
########################### 通用端口延迟告警 ###########################
- alert: Port_High_Latency
expr: probe_duration_seconds > 0.5
for: 1m
labels:
severity: warning
annotations:
summary: "主机{{$labels.instance}} {{$labels.service}}端口{{$labels.port}}连接延迟过高"
description: "端口{{$labels.port}}服务{{$labels.service}}网络耗时超过500ms,网络存在拥塞"