1 # DO NOT EDIT - This file is being maintained by Chef
6 - alert: prometheus target missing
10 alertgroup: "prometheus"
13 - alert: pdu current draw
14 expr: rPDU2PhaseStatusCurrent{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 10 > 10
17 alertgroup: "amsterdam"
19 current: "{{ $value | humanize }}A"
20 - alert: site current draw
21 expr: sum(rPDU2PhaseStatusCurrent{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 10) > 13
24 alertgroup: "amsterdam"
26 current: "{{ $value | humanize }}A"
27 - alert: site temperature
28 expr: min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 > 25
31 alertgroup: "amsterdam"
33 temperature: "{{ $value | humanize }}C"
34 - alert: site humidity
35 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 < 0.25 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 > 0.65
38 alertgroup: "amsterdam"
40 humidity: "{{ $value | humanizePercentage }}"
47 alertgroup: "{{ $labels.instance }}"
48 - alert: apache workers busy
49 expr: sum(apache_workers{state="busy"}) by (instance) / sum(apache_scoreboard) by (instance) > 0.8
52 alertgroup: "{{ $labels.instance }}"
54 busy_workers: "{{ $value | humanizePercentage }}"
57 - alert: chef client not running
58 expr: time() - node_systemd_timer_last_trigger_seconds{name="chef-client.timer"} > 3600
61 alertgroup: "{{ $labels.instance }}"
63 down_time: "{{ $value | humanizeDuration }}"
67 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.6
70 alertgroup: "{{ $labels.instance }}"
72 pressure: "{{ $value | humanizePercentage }}"
75 - alert: postgres replication delay
76 expr: pg_replication_lag_seconds > 5
81 delay: "{{ $value | humanizeDuration }}"
85 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
90 error_rate: "{{ $value | humanizePercentage }}"
93 - alert: readonly filesystem
94 expr: node_filesystem_readonly == 1
97 alertgroup: "{{ $labels.instance }}"
98 - alert: filesystem low on space
99 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
102 alertgroup: "{{ $labels.instance }}"
104 percentage_free: "{{ $value | humanizePercentage }}"
105 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
106 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
107 - alert: filesystem low on inodes
108 expr: node_filesystem_files_free / node_filesystem_files < 0.1
111 alertgroup: "{{ $labels.instance }}"
113 percentage_free: "{{ $value | humanizePercentage }}"
114 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
115 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
118 - alert: hwmon fan alarm
119 expr: node_hwmon_fan_alarm == 1
122 alertgroup: "{{ $labels.instance }}"
124 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}}"
125 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}}"
126 - alert: hwmon temperature alarm
127 expr: node_hwmon_temp_alarm == 1
130 alertgroup: "{{ $labels.instance }}"
132 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}}"
133 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}}"
134 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}}"
135 - alert: hwmon voltage alarm
136 expr: node_hwmon_in_alarm == 1
139 alertgroup: "{{ $labels.instance }}"
141 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}}"
142 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}}"
143 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}}"
147 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
150 alertgroup: "{{ $labels.instance }}"
152 pressure: "{{ $value | humanizePercentage }}"
155 - alert: ipmi fan alarm
156 expr: ipmi_fan_speed_state > 0
159 alertgroup: "{{ $labels.instance }}"
161 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
162 - alert: ipmi temperature alarm
163 expr: ipmi_temperature_state > 0
166 alertgroup: "{{ $labels.instance }}"
168 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
169 - alert: ipmi voltage alarm
170 expr: ipmi_voltage_state > 0
173 alertgroup: "{{ $labels.instance }}"
175 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
176 - alert: ipmi power alarm
177 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
180 alertgroup: "{{ $labels.instance }}"
183 - alert: exim queue length
184 expr: exim_queue > exim_queue_limit
189 queue_length: "{{ $value }}"
190 - alert: mailman queue length
191 expr: mailman_queue_length > 200
196 queue_length: "{{ $value }}"
199 - alert: mdadm array inactive
200 expr: node_md_state{state="inactive"} > 0
203 alertgroup: "{{ $labels.instance }}"
205 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
206 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
207 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
208 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
209 - alert: mdadm array degraded
210 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
213 alertgroup: "{{ $labels.instance }}"
215 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
216 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
217 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
218 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
219 - alert: mdadm disk failed
220 expr: node_md_disks{state="failed"} > 0
223 alertgroup: "{{ $labels.instance }}"
225 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
226 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
227 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
228 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
232 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
235 alertgroup: "{{ $labels.instance }}"
237 memory_free: "{{ $value | humanizePercentage }}"
238 - alert: memory pressure
239 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
242 alertgroup: "{{ $labels.instance }}"
244 pressure: "{{ $value | humanizePercentage }}"
245 - alert: oom kill detected
246 expr: increase(node_vmstat_oom_kill[1m]) > 0
249 alertgroup: "{{ $labels.instance }}"
251 new_oom_kills: "{{ $value }}"
254 - alert: interface transmit rate
255 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
258 alertgroup: "{{ $labels.instance }}"
260 bandwidth_used: "{{ $value | humanizePercentage }}"
261 - alert: interface receive rate
262 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
265 alertgroup: "{{ $labels.instance }}"
267 bandwidth_used: "{{ $value | humanizePercentage }}"
268 - alert: interface transmit errors
269 expr: rate(node_network_transmit_errs_total[1m]) / rate(node_network_transmit_packets_total[1m]) > 0.01
272 alertgroup: "{{ $labels.instance }}"
274 error_rate: "{{ $value | humanizePercentage }}"
275 - alert: interface receive errors
276 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
279 alertgroup: "{{ $labels.instance }}"
281 error_rate: "{{ $value | humanizePercentage }}"
282 - alert: conntrack entries
283 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
286 alertgroup: "{{ $labels.instance }}"
288 entries_used: "{{ $value | humanizePercentage }}"
291 - alert: planet dump overdue
292 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
297 overdue_by: "{{ $value | humanizeDuration }}"
298 - alert: notes dump overdue
299 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
304 overdue_by: "{{ $value | humanizeDuration }}"
305 - alert: daily replication feed delayed
306 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
311 delayed_by: "{{ $value | humanizeDuration }}"
312 - alert: hourly replication feed delayed
313 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
318 delayed_by: "{{ $value | humanizeDuration }}"
319 - alert: minutely replication feed delayed
320 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
325 delayed_by: "{{ $value | humanizeDuration }}"
326 - alert: changeset replication feed delayed
327 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
332 delayed_by: "{{ $value | humanizeDuration }}"
335 - alert: postgresql down
339 alertgroup: "{{ $labels.instance }}"
340 - alert: postgresql replication delay
341 expr: pg_replication_lag_seconds > 5
344 alertgroup: "{{ $labels.instance }}"
346 delay: "{{ $value | humanizeDuration }}"
347 - alert: postgresql connection limit
348 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
351 alertgroup: "{{ $labels.instance }}"
353 connections_used: "{{ $value | humanizePercentage }}"
354 - alert: postgresql deadlocks
355 expr: increase(pg_stat_database_deadlocks[1m]) > 5
358 alertgroup: "{{ $labels.instance }}"
360 new_deadlocks: "{{ $value }}"
361 - alert: postgresql slow queries
362 expr: pg_slow_queries > 0
365 alertgroup: "{{ $labels.instance }}"
367 queries: "{{ $value }}"
370 - alert: smart failure
371 expr: smart_health_status == 0
374 alertgroup: "{{ $labels.instance }}"
375 - alert: smart ssd wearout approaching
376 expr: smart_percentage_used >= 90
379 alertgroup: "{{ $labels.instance }}"
381 percentage_used: "{{ $value | humanizePercentage }}"
384 - alert: ssl certificate probe failed
385 expr: ssl_probe_success == 0
389 - alert: ssl certificate expiry
390 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
395 expires_in: "{{ $value | humanizeDuration }}"
396 - alert: ssl certificate revoked
397 expr: ssl_ocsp_response_status == 1
401 - alert: ocsp status unknown
402 expr: ssl_ocsp_response_status == 1
408 - alert: statuscake uptime check failing
409 expr: statuscake_uptime{status="down",paused="false"} > 0
412 alertgroup: statuscake
415 - alert: systemd failed service
416 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
419 alertgroup: "{{ $labels.instance }}"
420 - alert: systemd failed service
421 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
424 alertgroup: "{{ $labels.instance }}"
427 - alert: renderd replication delay
428 expr: renderd_replication_delay > 120
433 delay: "{{ $value | humanizeDuration }}"
434 - alert: missed tile rate
435 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
440 miss_rate: "{{ $value | humanizePercentage }}"
443 - alert: clock not synchronising
444 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
447 alertgroup: "{{ $labels.instance }}"
448 - alert: clock skew detected
449 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)
452 alertgroup: "{{ $labels.instance }}"
454 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
457 - alert: web error rate
458 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
463 error_rate: "{{ $value | humanizePercentage }}"
464 - alert: job processing rate
465 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
470 job_processing_rate: "{{ $value | humanizePercentage }}"