X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ae501e32e6b6b901122e511470c2f838cd1b9e0a..06f75772a25febcfd00bfb8607ce3931520adb22:/cookbooks/prometheus/templates/default/alert_rules.yml.erb diff --git a/cookbooks/prometheus/templates/default/alert_rules.yml.erb b/cookbooks/prometheus/templates/default/alert_rules.yml.erb index 899c765e4..d717e4f0a 100644 --- a/cookbooks/prometheus/templates/default/alert_rules.yml.erb +++ b/cookbooks/prometheus/templates/default/alert_rules.yml.erb @@ -4,7 +4,7 @@ groups: - name: amsterdam rules: - alert: uplink - expr: ifOperStatus{site="amsterdam",ifName=~"ge-[01]/2/2"} != 1 + expr: junos_interface_up{site="amsterdam",name=~"ge-[01]/2/2"} != 1 for: 6m labels: alertgroup: "amsterdam" @@ -117,7 +117,7 @@ groups: - name: dublin rules: - alert: uplink - expr: ifOperStatus{site="dublin",ifName=~"ge-[01]/2/2"} != 1 + expr: junos_interface_up{site="dublin",name=~"ge-[01]/2/2"} != 1 for: 6m labels: alertgroup: "dublin" @@ -272,20 +272,34 @@ groups: alertgroup: "{{ $labels.instance }}" - name: juniper rules: + - alert: juniper red alarms + expr: juniper_alarms_red_count > 0 + for: 5m + labels: + alertgroup: "{{ $labels.site }}" + annotations: + alarm_count: "{{ $value }} alarms" + - alert: juniper yellow alarms + expr: juniper_alarms_yellow_count > 0 + for: 5m + labels: + alertgroup: "{{ $labels.site }}" + annotations: + alarm_count: "{{ $value }} alarms" - alert: juniper cpu alarm - expr: jnxOperating5MinLoadAvg{jnxOperatingContentsIndex="9"} / 200 > 0.5 + expr: junos_route_engine_load_average_five / 2 > 0.5 for: 5m labels: alertgroup: "{{ $labels.site }}" annotations: load_average: "{{ $value | humanizePercentage }}" - alert: juniper fan alarm - expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!~"running.*"} > 0 + expr: junos_environment_fan_up != 1 for: 5m labels: alertgroup: "{{ $labels.site }}" - alert: juniper power alarm - expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!~"running.*"} > 0 + expr: junos_environment_power_up != 1 for: 5m labels: alertgroup: "{{ $labels.site }}"