From 291e369aba53257d9b64406d28e40f8feba05cd6 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 24 Oct 2020 13:15:11 +0900 Subject: [PATCH] Add alert settings for router. --- .../files/etc/prometheus.d/alerts/snmp.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 cookbooks/prometheus/files/etc/prometheus.d/alerts/snmp.yml diff --git a/cookbooks/prometheus/files/etc/prometheus.d/alerts/snmp.yml b/cookbooks/prometheus/files/etc/prometheus.d/alerts/snmp.yml new file mode 100644 index 0000000..ffe98ec --- /dev/null +++ b/cookbooks/prometheus/files/etc/prometheus.d/alerts/snmp.yml @@ -0,0 +1,21 @@ +groups: +- name: snmp + rules: + - alert: NetworkInboundBandwidth + expr: ((delta(ifHCInOctets{ifName="bond0"}[10m]) * 8 * 100) / (600 * ifSpeed{ifName="bond0"})) * 100 > 80 + for: 1m + labels: + severity: warning + annotations: + summary: "Network Bandwidth (inbound) exceeds 80%" + description: "Network Bandwidth (inbound) exceeds 80%" + + - alert: NetworkOutboundBandwidth + expr: ((delta(ifHCOutOctets{ifName="bond0"}[10m]) * 8 * 100) / (600 * ifSpeed{ifName="bond0"})) * 100 > 80 + for: 1m + labels: + severity: warning + annotations: + summary: "Network Bandwidth (outbound) exceeds 80%" + description: "Network Bandwidth (outbound) exceeds 80%" +