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 }}"
27 - alert: chef client not running
28 expr: time() - node_systemd_timer_last_trigger_seconds{name="chef-client.timer"} > 3600
31 alertgroup: "{{ $labels.instance }}"
33 down_time: "{{ $value | humanizeDuration }}"
37 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.6
40 alertgroup: "{{ $labels.instance }}"
42 pressure: "{{ $value | humanizePercentage }}"
45 - alert: postgres replication delay
46 expr: pg_replication_lag_seconds > 5
51 delay: "{{ $value | humanizeDuration }}"
55 expr: sum(rate(fastly_rt_status_group_total{status_group="5xx"}[5m])) by (service_name, datacenter) / sum(rate(fastly_rt_status_group_total[5m])) by (service_name, datacenter) > 0.005
60 error_rate: "{{ $value | humanizePercentage }}"
63 - alert: readonly filesystem
64 expr: node_filesystem_readonly == 1
67 alertgroup: "{{ $labels.instance }}"
68 - alert: filesystem low on space
69 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
72 alertgroup: "{{ $labels.instance }}"
74 percentage_free: "{{ $value | humanizePercentage }}"
75 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
76 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
77 - alert: filesystem low on inodes
78 expr: node_filesystem_files_free / node_filesystem_files < 0.1
81 alertgroup: "{{ $labels.instance }}"
83 percentage_free: "{{ $value | humanizePercentage }}"
84 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
85 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
88 - alert: hwmon fan alarm
89 expr: node_hwmon_fan_alarm == 1
92 alertgroup: "{{ $labels.instance }}"
94 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}}"
95 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}}"
96 - alert: hwmon temperature alarm
97 expr: node_hwmon_temp_alarm == 1
100 alertgroup: "{{ $labels.instance }}"
102 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}}"
103 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}}"
104 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}}"
105 - alert: hwmon voltage alarm
106 expr: node_hwmon_in_alarm == 1
109 alertgroup: "{{ $labels.instance }}"
111 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}}"
112 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}}"
113 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}}"
117 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
120 alertgroup: "{{ $labels.instance }}"
122 pressure: "{{ $value | humanizePercentage }}"
125 - alert: ipmi fan alarm
126 expr: ipmi_fan_speed_state > 0
129 alertgroup: "{{ $labels.instance }}"
131 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
132 - alert: ipmi temperature alarm
133 expr: ipmi_temperature_state > 0
136 alertgroup: "{{ $labels.instance }}"
138 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
139 - alert: ipmi voltage alarm
140 expr: ipmi_voltage_state > 0
143 alertgroup: "{{ $labels.instance }}"
145 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
146 - alert: ipmi power alarm
147 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
150 alertgroup: "{{ $labels.instance }}"
153 - alert: exim queue length
154 expr: exim_queue > exim_queue_limit
159 queue_length: "{{ $value }}"
160 - alert: mailman queue length
161 expr: mailman_queue_length > 200
166 queue_length: "{{ $value }}"
169 - alert: mdadm array inactive
170 expr: node_md_state{state="inactive"} > 0
173 alertgroup: "{{ $labels.instance }}"
175 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
176 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
177 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
178 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
179 - alert: mdadm array degraded
180 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
183 alertgroup: "{{ $labels.instance }}"
185 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
186 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
187 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
188 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
189 - alert: mdadm disk failed
190 expr: node_md_disks{state="failed"} > 0
193 alertgroup: "{{ $labels.instance }}"
195 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
196 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
197 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
198 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
202 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
205 alertgroup: "{{ $labels.instance }}"
207 memory_free: "{{ $value | humanizePercentage }}"
208 - alert: memory pressure
209 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
212 alertgroup: "{{ $labels.instance }}"
214 pressure: "{{ $value | humanizePercentage }}"
215 - alert: oom kill detected
216 expr: increase(node_vmstat_oom_kill[1m]) > 0
219 alertgroup: "{{ $labels.instance }}"
221 new_oom_kills: "{{ $value }}"
224 - alert: interface transmit rate
225 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
228 alertgroup: "{{ $labels.instance }}"
230 bandwidth_used: "{{ $value | humanizePercentage }}"
231 - alert: interface receive rate
232 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
235 alertgroup: "{{ $labels.instance }}"
237 bandwidth_used: "{{ $value | humanizePercentage }}"
238 - alert: interface transmit errors
239 expr: rate(node_network_transmit_errs_total[1m]) / rate(node_network_transmit_packets_total[1m]) > 0.01
242 alertgroup: "{{ $labels.instance }}"
244 error_rate: "{{ $value | humanizePercentage }}"
245 - alert: interface receive errors
246 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
249 alertgroup: "{{ $labels.instance }}"
251 error_rate: "{{ $value | humanizePercentage }}"
252 - alert: conntrack entries
253 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
256 alertgroup: "{{ $labels.instance }}"
258 entries_used: "{{ $value | humanizePercentage }}"
261 - alert: planet dump overdue
262 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
267 overdue_by: "{{ $value | humanizeDuration }}"
268 - alert: notes dump overdue
269 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
274 overdue_by: "{{ $value | humanizeDuration }}"
275 - alert: daily replication feed delayed
276 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
281 delayed_by: "{{ $value | humanizeDuration }}"
282 - alert: hourly replication feed delayed
283 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
288 delayed_by: "{{ $value | humanizeDuration }}"
289 - alert: minutely replication feed delayed
290 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
295 delayed_by: "{{ $value | humanizeDuration }}"
296 - alert: changeset replication feed delayed
297 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
302 delayed_by: "{{ $value | humanizeDuration }}"
305 - alert: postgresql down
309 alertgroup: "{{ $labels.instance }}"
310 - alert: postgresql replication delay
311 expr: pg_replication_lag_seconds > 5
314 alertgroup: "{{ $labels.instance }}"
316 delay: "{{ $value | humanizeDuration }}"
317 - alert: postgresql connection limit
318 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
321 alertgroup: "{{ $labels.instance }}"
323 connections_used: "{{ $value | humanizePercentage }}"
324 - alert: postgresql deadlocks
325 expr: increase(pg_stat_database_deadlocks[1m]) > 5
328 alertgroup: "{{ $labels.instance }}"
330 new_deadlocks: "{{ $value }}"
331 - alert: postgresql slow queries
332 expr: pg_slow_queries > 0
335 alertgroup: "{{ $labels.instance }}"
337 queries: "{{ $value }}"
340 - alert: smart failure
341 expr: smart_health_status == 0
344 alertgroup: "{{ $labels.instance }}"
345 - alert: smart ssd wearout approaching
346 expr: smart_percentage_used >= 90
349 alertgroup: "{{ $labels.instance }}"
351 percentage_used: "{{ $value | humanizePercentage }}"
354 - alert: ssl certificate probe failed
355 expr: ssl_probe_success == 0
359 - alert: ssl certificate expiry
360 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
365 expires_in: "{{ $value | humanizeDuration }}"
366 - alert: ssl certificate revoked
367 expr: ssl_ocsp_response_status == 1
371 - alert: ocsp status unknown
372 expr: ssl_ocsp_response_status == 1
378 - alert: systemd failed service
379 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
382 alertgroup: "{{ $labels.instance }}"
383 - alert: systemd failed service
384 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
387 alertgroup: "{{ $labels.instance }}"
390 - alert: renderd replication delay
391 expr: renderd_replication_delay > 120
396 delay: "{{ $value | humanizeDuration }}"
397 - alert: missed tile rate
398 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
403 miss_rate: "{{ $value | humanizePercentage }}"
406 - alert: clock not synchronising
407 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
410 alertgroup: "{{ $labels.instance }}"
411 - alert: clock skew detected
412 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)
415 alertgroup: "{{ $labels.instance }}"
417 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
420 - alert: web error rate
421 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
426 error_rate: "{{ $value | humanizePercentage }}"
427 - alert: job processing rate
428 expr: rate(pg_stat_user_tables_n_tup_del{datname="openstreetmap",relname="delayed_jobs"}[5m]) / rate(pg_stat_user_tables_n_tup_ins{datname="openstreetmap",relname="delayed_jobs"}[5m]) < 0.9 and ignoring(job, name, datname, relname, schemaname, server) chef_role{name="db-master"} == 1
433 job_processing_rate: "{{ $value | humanizePercentage }}"