1 # DO NOT EDIT - This file is being maintained by Chef
6 - alert: prometheus target missing
10 alertgroup: "prometheus"
17 alertgroup: "{{ $labels.instance }}"
18 - alert: apache workers busy
19 expr: sum(apache_workers{state="busy"}) by (instance) / sum(apache_scoreboard) by (instance) > 0.8
22 alertgroup: "{{ $labels.instance }}"
24 busy_workers: "{{ $value | humanizePercentage }}"
28 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.3
31 alertgroup: "{{ $labels.instance }}"
33 pressure: "{{ $value | humanizePercentage }}"
36 - alert: postgres replication delay
37 expr: pg_replication_lag_seconds > 5
42 delay: "{{ $value | humanizeDuration }}"
45 - alert: readonly filesystem
46 expr: node_filesystem_readonly == 1
49 alertgroup: "{{ $labels.instance }}"
50 - alert: filesystem low on space
51 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
54 alertgroup: "{{ $labels.instance }}"
56 percentage_free: "{{ $value | humanizePercentage }}"
57 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
58 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
59 - alert: filesystem low on inodes
60 expr: node_filesystem_files_free / node_filesystem_files < 0.1
63 alertgroup: "{{ $labels.instance }}"
65 percentage_free: "{{ $value | humanizePercentage }}"
66 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
67 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
70 - alert: hwmon fan alarm
71 expr: node_hwmon_fan_alarm == 1
74 alertgroup: "{{ $labels.instance }}"
76 fan_rpm: "{{ with printf \"node_hwmon_fan_rpm{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}rpm{{end}}"
77 fan_min_rpm: "{{ with printf \"node_hwmon_fan_min_rpm{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}rpm{{end}}"
78 - alert: hwmon temperature alarm
79 expr: node_hwmon_temp_alarm == 1
82 alertgroup: "{{ $labels.instance }}"
84 temp_celsius: "{{ with printf \"node_hwmon_temp_celsius{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}C{{end}}"
85 temp_max_celsius: "{{ with printf \"node_hwmon_temp_max_celsius{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}C{{end}}"
86 temp_crit_celsius: "{{ with printf \"node_hwmon_temp_crit_celsius{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}C{{end}}"
87 - alert: hwmon voltage alarm
88 expr: node_hwmon_in_alarm == 1
91 alertgroup: "{{ $labels.instance }}"
93 in_volts: "{{ with printf \"node_hwmon_in_volts{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}V{{end}}"
94 in_min_volts: "{{ with printf \"node_hwmon_in_min_volts{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}V{{end}}"
95 in_max_volts: "{{ with printf \"node_hwmon_in_max_volts{instance='%s',chip='%s',sensor='%s'}\" $labels.instance $labels.chip $labels.sensor | query }}{{ . | first | value | humanize }}V{{end}}"
99 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
102 alertgroup: "{{ $labels.instance }}"
104 pressure: "{{ $value | humanizePercentage }}"
107 - alert: ipmi fan alarm
108 expr: ipmi_fan_speed_state > 0
111 alertgroup: "{{ $labels.instance }}"
113 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
114 - alert: ipmi temperature alarm
115 expr: ipmi_temperature_state > 0
118 alertgroup: "{{ $labels.instance }}"
120 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
121 - alert: ipmi voltage alarm
122 expr: ipmi_voltage_state > 0
125 alertgroup: "{{ $labels.instance }}"
127 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
128 - alert: ipmi power alarm
129 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
132 alertgroup: "{{ $labels.instance }}"
135 - alert: mdadm array inactive
136 expr: node_md_state{state="inactive"} > 0
139 alertgroup: "{{ $labels.instance }}"
141 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
142 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
143 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
144 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
145 - alert: mdadm array degraded
146 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
149 alertgroup: "{{ $labels.instance }}"
151 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
152 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
153 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
154 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
155 - alert: mdadm disk failed
156 expr: node_md_disks{state="failed"} > 0
159 alertgroup: "{{ $labels.instance }}"
161 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
162 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
163 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
164 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
168 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
171 alertgroup: "{{ $labels.instance }}"
173 memory_free: "{{ $value | humanizePercentage }}"
174 - alert: memory pressure
175 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
178 alertgroup: "{{ $labels.instance }}"
180 pressure: "{{ $value | humanizePercentage }}"
181 - alert: oom kill detected
182 expr: increase(node_vmstat_oom_kill[1m]) > 0
185 alertgroup: "{{ $labels.instance }}"
187 new_oom_kills: "{{ $value }}"
190 - alert: interface transmit rate
191 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
194 alertgroup: "{{ $labels.instance }}"
196 bandwidth_used: "{{ $value | humanizePercentage }}"
197 - alert: interface receive rate
198 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
201 alertgroup: "{{ $labels.instance }}"
203 bandwidth_used: "{{ $value | humanizePercentage }}"
204 - alert: interface transmit errors
205 expr: rate(node_network_transmit_errs_total[1m]) / rate(node_network_transmit_packets_total[1m]) > 0.01
208 alertgroup: "{{ $labels.instance }}"
210 error_rate: "{{ $value | humanizePercentage }}"
211 - alert: interface receive errors
212 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
215 alertgroup: "{{ $labels.instance }}"
217 error_rate: "{{ $value | humanizePercentage }}"
218 - alert: conntrack entries
219 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
222 alertgroup: "{{ $labels.instance }}"
224 entries_used: "{{ $value | humanizePercentage }}"
227 - alert: planet dump overdue
228 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
233 overdue_by: "{{ $value | humanizeDuration }}"
234 - alert: notes dump overdue
235 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
240 overdue_by: "{{ $value | humanizeDuration }}"
241 - alert: daily replication feed delayed
242 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
247 delayed_by: "{{ $value | humanizeDuration }}"
248 - alert: hourly replication feed delayed
249 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
254 delayed_by: "{{ $value | humanizeDuration }}"
255 - alert: minutely replication feed delayed
256 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
261 delayed_by: "{{ $value | humanizeDuration }}"
262 - alert: changeset replication feed delayed
263 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
268 delayed_by: "{{ $value | humanizeDuration }}"
271 - alert: postgresql down
275 alertgroup: "{{ $labels.instance }}"
276 - alert: postgresql replication delay
277 expr: pg_replication_lag_seconds > 5
280 alertgroup: "{{ $labels.instance }}"
282 delay: "{{ $value | humanizeDuration }}"
283 - alert: postgresql connection limit
284 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
287 alertgroup: "{{ $labels.instance }}"
289 connections_used: "{{ $value | humanizePercentage }}"
290 - alert: postgresql deadlocks
291 expr: increase(pg_stat_database_deadlocks[1m]) > 5
294 alertgroup: "{{ $labels.instance }}"
296 new_deadlocks: "{{ $value }}"
297 - alert: postgresql slow queries
298 expr: pg_slow_queries > 0
301 alertgroup: "{{ $labels.instance }}"
303 queries: "{{ $value }}"
306 - alert: smart failure
307 expr: smart_health_status == 0
310 alertgroup: "{{ $labels.instance }}"
311 - alert: smart ssd wearout approaching
312 expr: smart_percentage_used >= 90
315 alertgroup: "{{ $labels.instance }}"
317 percentage_used: "{{ $value | humanizePercentage }}"
320 - alert: ssl certificate probe failed
321 expr: ssl_probe_success == 0
325 - alert: ssl certificate expiry
326 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
331 expires_in: "{{ $value | humanizeDuration }}"
332 - alert: ssl certificate revoked
333 expr: ssl_ocsp_response_status == 1
337 - alert: ocsp status unknown
338 expr: ssl_ocsp_response_status == 1
344 - alert: systemd failed service
345 expr: node_systemd_unit_state{state="failed"} == 1
348 alertgroup: "{{ $labels.instance }}"
351 - alert: renderd replication delay
352 expr: renderd_replication_delay > 120
357 delay: "{{ $value | humanizeDuration }}"
358 - alert: missed tile rate
359 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
364 miss_rate: "{{ $value | humanizePercentage }}"
367 - alert: clock not synchronising
368 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
371 alertgroup: "{{ $labels.instance }}"
372 - alert: clock skew detected
373 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)
376 alertgroup: "{{ $labels.instance }}"
378 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
381 - alert: web error rate
382 expr: sum(rate(api_call_count_total{status=~"50[0-8]|5[1-9][0-9]"}[5m])) by (instance) / sum(rate(api_call_count_total[5m])) by (instance) > 0.002
387 error_rate: "{{ $value | humanizePercentage }}"