2023-11-01 05:57:21 +01:00
|
|
|
---
|
|
|
|
prometheus__alertmanager_targets:
|
|
|
|
- docker-ovh.adm.auro.re:9093
|
|
|
|
|
|
|
|
prometheus__tsdb_retention_time: 90d
|
|
|
|
|
|
|
|
prometheus__scraping:
|
|
|
|
node:
|
|
|
|
targets: "{{ groups.vm_network + groups.pve_network }}"
|
|
|
|
address:
|
|
|
|
port: 9100
|
|
|
|
prometheus:
|
|
|
|
targets: "{{ groups.prom }}"
|
|
|
|
address:
|
|
|
|
port: 9090
|
|
|
|
kresd:
|
|
|
|
targets: "{{ groups.dns }}"
|
|
|
|
address:
|
|
|
|
port: 8453
|
|
|
|
bird:
|
|
|
|
targets: "{{ groups.router }}"
|
|
|
|
address:
|
|
|
|
port: 9324
|
|
|
|
quanta:
|
|
|
|
targets: "{{ groups.quanta }}"
|
|
|
|
address: 127.0.0.1:9116
|
|
|
|
path: /snmp
|
|
|
|
params:
|
|
|
|
module:
|
|
|
|
- quanta
|
|
|
|
snmp:
|
|
|
|
targets: "{{ groups.prom }}"
|
|
|
|
address:
|
|
|
|
port: 9116
|
|
|
|
|
|
|
|
prometheus__alert_rules_prometheus:
|
|
|
|
- alert: PrometheusTsdbCompactionFailed
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
increase(prometheus_tsdb_compactions_failed_total[1m]) > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
|
2023-11-01 18:56:44 +01:00
|
|
|
prometheus__alert_rules_common:
|
|
|
|
- alert: CollectorDown
|
2023-11-02 05:52:47 +01:00
|
|
|
expr: >
|
|
|
|
up == 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Job: !unsafe "{{ $labels.job }}"
|
2023-11-01 18:56:44 +01:00
|
|
|
|
|
|
|
prometheus__alert_rules_node:
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: OutOfMemory
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (
|
|
|
|
node_memory_MemFree_bytes
|
|
|
|
+ node_memory_Cached_bytes
|
|
|
|
+ node_memory_Buffers_bytes
|
|
|
|
) / node_memory_MemTotal_bytes < 10
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
FreeMemory: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostSwapIsFillingUp
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (
|
|
|
|
1 - (
|
|
|
|
node_memory_SwapFree_bytes
|
|
|
|
/ node_memory_SwapTotal_bytes
|
|
|
|
)
|
|
|
|
) >= 50
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
UsedSwap: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostPhysicalComponentTooHot
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_hwmon_temp_celsius > 79
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Temperature: !unsafe '{{ printf "%.0f" $value }} °C'
|
|
|
|
Chip: !unsafe "{{ $labels.chip }}"
|
|
|
|
Sensor: !unsafe "{{ $labels.sensor }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostNodeOvertemperatureAlarm
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_hwmon_temp_crit_alarm_celsius == 1
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Chip: !unsafe "{{ $labels.chip }}"
|
|
|
|
Sensor: !unsafe "{{ $labels.sensor }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostRaidArrayGotInactive
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_md_state{state="inactive"} > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Device: !unsafe "{{ $labels.device }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostRaidDiskFailure
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_md_disks{state="failed"} > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
severity: !unsafe "{{ $labels.md_device }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostOomKillDetected
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
increase(node_vmstat_oom_kill[1m]) > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
PID: !unsafe "{{ $value }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostEdacCorrectableErrorsDetected
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
increase(node_edac_correctable_errors_total[1m]) > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
CorrectedErrors: !unsafe "{{ $value }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostEdacUncorrectableErrorsDetected
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
increase(node_edac_uncorrectable_errors_total[1m]) > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
DetectedErrors: !unsafe "{{ $value }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: OutOfDiskSpace
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
(
|
|
|
|
100 * node_filesystem_free_bytes
|
|
|
|
/ node_filesystem_size_bytes < 10
|
|
|
|
)
|
|
|
|
and on (instance, device, mountpoint) (
|
|
|
|
node_filesystem_readonly
|
|
|
|
) == 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Mountpoint: !unsafe '{{ $labels.mountpoint }}'
|
|
|
|
FreeSpace: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostConntrackLimit
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (
|
|
|
|
node_nf_conntrack_entries
|
|
|
|
/ node_nf_conntrack_entries_limit
|
|
|
|
) > 80
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Filled: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostClockSkew
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
(
|
|
|
|
node_timex_offset_seconds > 0.05
|
|
|
|
and deriv(node_timex_offset_seconds[5m]) >= 0
|
|
|
|
) or (
|
|
|
|
node_timex_offset_seconds < -0.05
|
|
|
|
and deriv(node_timex_offset_seconds[5m]) <= 0
|
|
|
|
)
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 2m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
- alert: HostClockNotSynchronising
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
min_over_time(node_timex_sync_status[1m]) == 0
|
|
|
|
and node_timex_maxerror_seconds >= 16
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 2m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
- alert: HostRequiresReboot
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_reboot_required > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
- alert: OutOfInodes
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * node_filesystem_files_free
|
|
|
|
/ node_filesystem_files < 10
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 3m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Mountpoint: !unsafe "{{ $labels.mountpoint }}"
|
|
|
|
FreeInodes: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: CpuUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (
|
|
|
|
1 - avg by (instance) (
|
|
|
|
irate(node_cpu_seconds_total{mode="idle"}[5m])
|
|
|
|
)
|
|
|
|
) > 75
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Usage: !unsafe '{{ printf "%.0f" $value }} %'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: SystemdServiceFailed
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_systemd_unit_state{state="failed"} == 1
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Service: !unsafe "{{ $labels.name }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: LoadUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
node_load1 > 5
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 2m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Load1: !unsafe '{{ printf "%.0f" $value }}'
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: UnhealthyDisk
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
smartmon_device_smart_healthy < 1
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 10m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Disk: !unsafe "{{ $labels.disk }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: HostCpuStealNoisyNeighbor
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * avg by (instance) (
|
|
|
|
rate(node_cpu_seconds_total{mode="steal"}[5m])
|
|
|
|
) > 10
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Disk: !unsafe "{{ $labels.disk }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
|
|
|
|
prometheus__alert_rules_keepalived:
|
|
|
|
- alert: KeepalivedVrrpFault
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
keepalived_vrrp_state{state="fault"} > 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Instance: !unsafe "{{ $labels.instance }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
- alert: KeepalivedMasterChange
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
changes(
|
|
|
|
keepalived_vrrp_state{
|
|
|
|
keepalived_vvrp_state="master"
|
|
|
|
}[1m]
|
|
|
|
) > 1
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Instance: !unsafe "{{ $labels.instance }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
|
|
|
|
prometheus__alert_rules_bird:
|
2023-11-02 05:52:47 +01:00
|
|
|
- record: bird:protocol_up:bgp
|
|
|
|
expr:
|
|
|
|
label_replace(
|
2023-11-02 06:15:47 +01:00
|
|
|
bird_protocol_up{proto="BGP",}
|
|
|
|
unless bird_protocol_up{
|
|
|
|
proto="BGP",
|
|
|
|
name=~"^(viarezo|isp[12]|rezel)[46]$"
|
|
|
|
},
|
2023-11-02 05:52:47 +01:00
|
|
|
"group", "$1",
|
|
|
|
"instance", "^([^0-9\\.]+)-[0-9]+.*"
|
|
|
|
)
|
|
|
|
# Sessions qui ne sont volontairement pas redondées
|
|
|
|
# au sein d'un groupe
|
|
|
|
- record: bird:protocol_up:bgp:non_redundant
|
|
|
|
expr:
|
|
|
|
bird:protocol_up:bgp{
|
|
|
|
group="edge",
|
|
|
|
name=~"^(oti|crans|legacy|edge)[46]$"
|
|
|
|
}
|
|
|
|
# Sessions qui le sont
|
|
|
|
- record: bird:protocol_up:bgp:redundant
|
|
|
|
expr:
|
|
|
|
bird:protocol_up:bgp
|
|
|
|
unless
|
|
|
|
bird:protocol_up:bgp:non_redundant
|
|
|
|
- alert: BirdBGPRedundancyDegraded
|
|
|
|
expr:
|
|
|
|
(
|
|
|
|
count by (group, name) (
|
|
|
|
bird:protocol_up:bgp:redundant{state="Established"}
|
|
|
|
) or (
|
|
|
|
count by (group, name) (
|
|
|
|
bird:protocol_up:bgp:redundant{state!="Established"}
|
|
|
|
) * 0
|
|
|
|
)
|
|
|
|
) < 2
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
Session: !unsafe "{{ $labels.name }}"
|
|
|
|
Count: !unsafe "{{ $value }}"
|
|
|
|
Group: !unsafe "{{ $labels.group }}"
|
|
|
|
- alert: BirdBGPDown
|
|
|
|
expr:
|
|
|
|
(
|
|
|
|
count by (group, name) (
|
|
|
|
bird:protocol_up:bgp{state="Established"}
|
|
|
|
) or (
|
|
|
|
count by (group, name) (
|
|
|
|
bird:protocol_up:bgp{state!="Established"}
|
|
|
|
) * 0
|
|
|
|
)
|
|
|
|
) == 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
|
|
|
Session: !unsafe "{{ $labels.name }}"
|
|
|
|
Group: !unsafe "{{ $labels.group }}"
|
|
|
|
- alert: BirdBGPNoExportedPrefixRedundant
|
|
|
|
expr:
|
|
|
|
bird_protocol_prefix_export_count{
|
|
|
|
export_filter!="REJECT",
|
|
|
|
} * on (instance, name) (
|
|
|
|
bird:protocol_up:bgp:redundant{state="Established"}
|
|
|
|
) == 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
|
|
|
Session: !unsafe "{{ $labels.name }}"
|
2023-11-02 06:11:32 +01:00
|
|
|
- alert: BirdBGPNoImportedPrefixRedundant
|
|
|
|
expr:
|
|
|
|
bird_protocol_prefix_import_count{
|
|
|
|
import_filter!="REJECT",
|
|
|
|
} * on (instance, name) (
|
|
|
|
bird:protocol_up:bgp:redundant{state="Established"}
|
|
|
|
) == 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 05:52:47 +01:00
|
|
|
- alert: BirdBGPNoExportedPrefixNonRedundant
|
|
|
|
expr:
|
|
|
|
sum by (group) (
|
|
|
|
bird_protocol_prefix_export_count{
|
|
|
|
export_filter!="REJECT",
|
|
|
|
} * on (instance, name) group_left (group) (
|
|
|
|
bird:protocol_up:bgp:non_redundant{state="Established"}
|
|
|
|
)
|
|
|
|
) == 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
2023-11-02 06:11:32 +01:00
|
|
|
annotations:
|
|
|
|
Session: !unsafe "{{ $labels.name }}"
|
|
|
|
- alert: BirdBGPNoImportedPrefixNonRedundant
|
|
|
|
expr:
|
|
|
|
sum by (group) (
|
|
|
|
bird_protocol_prefix_import_count{
|
|
|
|
import_filter!="REJECT",
|
|
|
|
} * on (instance, name) group_left (group) (
|
|
|
|
bird:protocol_up:bgp:non_redundant{state="Established"}
|
|
|
|
)
|
|
|
|
) == 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
2023-11-02 05:52:47 +01:00
|
|
|
annotations:
|
|
|
|
Session: !unsafe "{{ $labels.name }}"
|
|
|
|
- alert: BirdOSPFNeighboursChange
|
|
|
|
expr:
|
|
|
|
changes(bird_ospf_neighbor_count[5m]) > 0
|
|
|
|
or changes(bird_ospfv3_neighbor_count[5m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
- alert: BirdOSPFDown
|
|
|
|
expr:
|
|
|
|
bird_ospf_running == 0
|
2023-11-01 05:57:21 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 05:52:47 +01:00
|
|
|
Instance: !unsafe "{{ $labels.name }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
|
2023-11-01 07:11:30 +01:00
|
|
|
prometheus__alert_rules_quanta:
|
|
|
|
- alert: QuantaQueueOverflow
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
snAgGblQueueOverflow == 1
|
2023-11-01 07:11:30 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaCpuUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
snAgGblCpuUtil1MinAvg > 50
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Usage: !unsafe "{{ $value }} %"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaCpuUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
snAgGblCpuUtil1MinAvg > 80
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Usage: !unsafe "{{ $value }} %"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaMemoryUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (1 - (snAgGblDynMemFree / snAgGblDynMemTotal)) > 50
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
UsedMemory: !unsafe "{{ $value }} %"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaMemoryUsage
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
100 * (1 - (snAgGblDynMemFree / snAgGblDynMemTotal)) > 80
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 5m
|
|
|
|
labels:
|
|
|
|
severity: alert
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
UsedMemory: !unsafe "{{ $value }} %"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaFanHealth
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
snChasFanOperStatus{snChasFanOperStatus="normal"} == 0
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Description: !unsafe "{{ $labels.shChasFanDescription }}"
|
|
|
|
Status: !unsafe "{{ $labels.snChasFanOperStatus }}"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaTemp
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
0.5 * snAgentTempValue > 45
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Temperature: !unsafe "{{ $value }} °C"
|
|
|
|
Description: !unsafe "{{ $labels.snAgentTempSensorDescr }}"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaTemp
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
0.5 * snAgentTempValue > 60
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: critical
|
|
|
|
annotations:
|
2023-11-02 00:25:35 +01:00
|
|
|
Temperature: !unsafe "{{ $value }} °C"
|
|
|
|
Description: !unsafe "{{ $labels.snAgentTempSensorDescr }}"
|
2023-11-01 18:34:17 +01:00
|
|
|
- alert: QuantaPowerRedundancyFailure
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
count by (instance) (
|
|
|
|
snChasPwrSupplyOperStatus{snChasPwrSupplyOperStatus="normal"}
|
|
|
|
) < 2
|
2023-11-01 18:34:17 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
2023-11-01 07:11:30 +01:00
|
|
|
|
2023-11-02 00:25:35 +01:00
|
|
|
prometheus__alert_rules_switch:
|
|
|
|
- alert: SwitchPromiscuousChange
|
2023-11-02 05:52:47 +01:00
|
|
|
expr:
|
|
|
|
changes(ifPromiscuousMode[5m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchInterfaceUpChange
|
|
|
|
expr:
|
|
|
|
changes(ifOperStatus{ifOperStatus="up"}[5m]) > 0
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchInErrors
|
|
|
|
expr:
|
|
|
|
100 * irate(ifInErrors[5m]) / (
|
|
|
|
irate(ifInUcastPkts[5m])
|
|
|
|
+ irate(ifInNUcastPkts[5m])
|
|
|
|
) > 0.01
|
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
|
|
|
ErrorRate: !unsafe '{{ printf "%.2f" $value }} %'
|
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
|
|
|
- alert: SwitchOutErrors
|
|
|
|
expr:
|
|
|
|
100 * irate(ifOutErrors[5m]) / (
|
|
|
|
irate(ifOutUcastPkts[5m])
|
|
|
|
+ irate(ifOutNUcastPkts[5m])
|
|
|
|
) > 0.01
|
2023-11-02 00:25:35 +01:00
|
|
|
for: 0m
|
|
|
|
labels:
|
|
|
|
severity: warning
|
|
|
|
annotations:
|
2023-11-02 05:52:47 +01:00
|
|
|
ErrorRate: !unsafe '{{ printf "%.2f" $value }} %'
|
2023-11-02 00:25:35 +01:00
|
|
|
Interface: !unsafe "{{ $labels.ifName }}
|
2023-11-02 05:52:47 +01:00
|
|
|
{{ if $labels.ifAlias }}- {{ $labels.ifAlias }}{{ end }}"
|
2023-11-02 00:25:35 +01:00
|
|
|
|
2023-11-01 05:57:21 +01:00
|
|
|
prometheus__alert_rules:
|
2023-11-01 18:56:44 +01:00
|
|
|
common: "{{ prometheus__alert_rules_common }}"
|
2023-11-02 00:25:35 +01:00
|
|
|
switch: "{{ prometheus__alert_rules_switch }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
prometheus: "{{ prometheus__alert_rules_prometheus }}"
|
|
|
|
node: "{{ prometheus__alert_rules_node }}"
|
|
|
|
keepalived: "{{ prometheus__alert_rules_keepalived }}"
|
2023-11-01 07:11:30 +01:00
|
|
|
quanta: "{{ prometheus__alert_rules_quanta }}"
|
2023-11-02 05:52:47 +01:00
|
|
|
bird: "{{ prometheus__alert_rules_bird }}"
|
2023-11-01 05:57:21 +01:00
|
|
|
...
|