1 # DO NOT EDIT - This file is being maintained by Chef
6 - alert: pdu current draw
7 expr: rPDU2PhaseStatusCurrent{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 10 > 10
10 alertgroup: "amsterdam"
12 current: "{{ $value | humanize }}A"
13 - alert: site current draw
14 expr: sum(rPDU2PhaseStatusCurrent{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 10) > 13
17 alertgroup: "amsterdam"
19 current: "{{ $value | humanize }}A"
20 - alert: site temperature
21 expr: min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 > 25
24 alertgroup: "amsterdam"
26 temperature: "{{ $value | humanize }}C"
27 - alert: site humidity
28 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 < 0.25 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 > 0.65
31 alertgroup: "amsterdam"
33 humidity: "{{ $value | humanizePercentage }}"
40 alertgroup: "{{ $labels.instance }}"
41 - alert: apache workers busy
42 expr: sum(apache_workers{state="busy"}) by (instance) / sum(apache_scoreboard) by (instance) > 0.8
45 alertgroup: "{{ $labels.instance }}"
47 busy_workers: "{{ $value | humanizePercentage }}"
48 - alert: apache low request rate
49 expr: rate(apache_accesses_total[5m]) / rate(apache_accesses_total[1h] offset 1w) < 0.25 and rate(apache_accesses_total[1h] offset 1w) > 2
52 alertgroup: "{{ $labels.instance }}"
54 request_rate: "{{ $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 }}"
66 - alert: cisco fan alarm
67 expr: rlPhdUnitEnvParamFan1Status{rlPhdUnitEnvParamFan1Status!="normal"} > 0 or rlPhdUnitEnvParamFan2Status{rlPhdUnitEnvParamFan2Status!="normal"} > 0
70 alertgroup: "{{ $labels.site }}"
72 fan_rpm: "{{ with printf \"rlPhdUnitEnvParamFan1Speed{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}rpm{{end}}"
73 - alert: cisco temperature alarm
74 expr: rlPhdUnitEnvParamTempSensorStatus{rlPhdUnitEnvParamTempSensorStatus!="ok"} > 0
77 alertgroup: "{{ $labels.site }}"
79 temp_celsius: "{{ with printf \"rlPhdUnitEnvParamTempSensorValue{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}C{{end}}"
80 - alert: cisco main power alarm
81 expr: rlPhdUnitEnvParamMainPSStatus{rlPhdUnitEnvParamMainPSStatus!="normal"} > 0
84 alertgroup: "{{ $labels.site }}"
85 - alert: cisco redundant power alarm
86 expr: rlPhdUnitEnvParamRedundantPSStatus{rlPhdUnitEnvParamRedundantPSStatus!="normal"} > 0
89 alertgroup: "{{ $labels.site }}"
93 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.6
96 alertgroup: "{{ $labels.instance }}"
98 pressure: "{{ $value | humanizePercentage }}"
101 - alert: postgres replication delay
102 expr: pg_replication_lag_seconds > 5
107 delay: "{{ $value | humanizeDuration }}"
110 - alert: pdu current draw
111 expr: rPDU2PhaseStatusCurrent{site="dublin",rPDU2PhaseStatusIndex="1"} / 10 > 13
116 current: "{{ $value | humanize }}A"
117 - alert: site current draw
118 expr: sum(rPDU2PhaseStatusCurrent{site="dublin",rPDU2PhaseStatusIndex="1"} / 10) > 17
123 current: "{{ $value | humanize }}A"
124 - alert: site temperature
125 expr: min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 > 25
130 temperature: "{{ $value | humanize }}C"
131 - alert: site humidity
132 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 < 0.25 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 > 0.65
137 humidity: "{{ $value | humanizePercentage }}"
140 - alert: fastly error rate
141 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
146 error_rate: "{{ $value | humanizePercentage }}"
147 - alert: fastly healthcheck failing
148 expr: count(fastly_healthcheck_status == 0) > 0
152 - alert: multipe fastly healthchecks failing
153 expr: count(fastly_healthcheck_status == 0) > 4
159 - alert: readonly filesystem
160 expr: node_filesystem_readonly == 1
163 alertgroup: "{{ $labels.instance }}"
164 - alert: filesystem low on space
165 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
168 alertgroup: "{{ $labels.instance }}"
170 percentage_free: "{{ $value | humanizePercentage }}"
171 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
172 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
173 - alert: filesystem low on inodes
174 expr: node_filesystem_files_free / node_filesystem_files < 0.1
177 alertgroup: "{{ $labels.instance }}"
179 percentage_free: "{{ $value | humanizePercentage }}"
180 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
181 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
184 - alert: hwmon fan alarm
185 expr: node_hwmon_fan_alarm == 1
188 alertgroup: "{{ $labels.instance }}"
190 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}}"
191 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}}"
192 - alert: hwmon temperature alarm
193 expr: node_hwmon_temp_alarm == 1
196 alertgroup: "{{ $labels.instance }}"
198 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}}"
199 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}}"
200 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}}"
201 - alert: hwmon voltage alarm
202 expr: node_hwmon_in_alarm == 1
205 alertgroup: "{{ $labels.instance }}"
207 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}}"
208 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}}"
209 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}}"
213 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
216 alertgroup: "{{ $labels.instance }}"
218 pressure: "{{ $value | humanizePercentage }}"
221 - alert: ipmi fan alarm
222 expr: ipmi_fan_speed_state > 0
225 alertgroup: "{{ $labels.instance }}"
227 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
228 - alert: ipmi temperature alarm
229 expr: ipmi_temperature_state > 0
232 alertgroup: "{{ $labels.instance }}"
234 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
235 - alert: ipmi voltage alarm
236 expr: ipmi_voltage_state > 0
239 alertgroup: "{{ $labels.instance }}"
241 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
242 - alert: ipmi power alarm
243 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
246 alertgroup: "{{ $labels.instance }}"
249 - alert: juniper fan alarm
250 expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"}[6m]) > 0
253 alertgroup: "{{ $labels.site }}"
254 - alert: juniper power alarm
255 expr: sum_over_time(jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"}[6m]) > 0
258 alertgroup: "{{ $labels.site }}"
261 - alert: exim queue length
262 expr: exim_queue > exim_queue_limit
267 queue_length: "{{ $value }}"
268 - alert: mailman queue length
269 expr: mailman_queue_length > 200
274 queue_length: "{{ $value }}"
277 - alert: mdadm array inactive
278 expr: node_md_state{state="inactive"} > 0
281 alertgroup: "{{ $labels.instance }}"
283 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
284 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
285 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
286 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
287 - alert: mdadm array degraded
288 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
291 alertgroup: "{{ $labels.instance }}"
293 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
294 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
295 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
296 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
297 - alert: mdadm disk failed
298 expr: node_md_disks{state="failed"} > 0
301 alertgroup: "{{ $labels.instance }}"
303 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
304 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
305 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
306 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
310 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
313 alertgroup: "{{ $labels.instance }}"
315 memory_free: "{{ $value | humanizePercentage }}"
316 - alert: memory pressure
317 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
320 alertgroup: "{{ $labels.instance }}"
322 pressure: "{{ $value | humanizePercentage }}"
323 - alert: oom kill detected
324 expr: increase(node_vmstat_oom_kill[1m]) > 0
327 alertgroup: "{{ $labels.instance }}"
329 new_oom_kills: "{{ $value }}"
332 - alert: interface transmit rate
333 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
336 alertgroup: "{{ $labels.instance }}"
338 bandwidth_used: "{{ $value | humanizePercentage }}"
339 - alert: interface receive rate
340 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
343 alertgroup: "{{ $labels.instance }}"
345 bandwidth_used: "{{ $value | humanizePercentage }}"
346 - alert: interface transmit errors
347 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
350 alertgroup: "{{ $labels.instance }}"
352 error_rate: "{{ $value | humanizePercentage }}"
353 - alert: wireguard interface transmit errors
354 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
357 alertgroup: "{{ $labels.instance }}"
359 error_rate: "{{ $value | humanizePercentage }}"
360 - alert: interface receive errors
361 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
364 alertgroup: "{{ $labels.instance }}"
366 error_rate: "{{ $value | humanizePercentage }}"
367 - alert: conntrack entries
368 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
371 alertgroup: "{{ $labels.instance }}"
373 entries_used: "{{ $value | humanizePercentage }}"
376 - alert: nominatim replication delay
377 expr: nominatim_replication_delay > 10800
380 alertgroup: nominatim
382 delay: "{{ $value | humanizeDuration }}"
385 - alert: overpass osm database age
386 expr: overpass_database_age_seconds{database="osm"} > 1800
391 age: "{{ $value | humanizeDuration }}"
392 - alert: overpass area database age
393 expr: overpass_database_age_seconds{database="area"} > 86400
398 age: "{{ $value | humanizeDuration }}"
401 - alert: planet dump overdue
402 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
407 overdue_by: "{{ $value | humanizeDuration }}"
408 - alert: notes dump overdue
409 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
414 overdue_by: "{{ $value | humanizeDuration }}"
415 - alert: daily replication feed delayed
416 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
421 delayed_by: "{{ $value | humanizeDuration }}"
422 - alert: hourly replication feed delayed
423 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
428 delayed_by: "{{ $value | humanizeDuration }}"
429 - alert: minutely replication feed delayed
430 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
435 delayed_by: "{{ $value | humanizeDuration }}"
436 - alert: changeset replication feed delayed
437 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
442 delayed_by: "{{ $value | humanizeDuration }}"
445 - alert: postgresql down
449 alertgroup: "{{ $labels.instance }}"
450 - alert: postgresql replication delay
451 expr: pg_replication_lag_seconds > 5
454 alertgroup: "{{ $labels.instance }}"
456 delay: "{{ $value | humanizeDuration }}"
457 - alert: postgresql connection limit
458 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
461 alertgroup: "{{ $labels.instance }}"
463 connections_used: "{{ $value | humanizePercentage }}"
464 - alert: postgresql deadlocks
465 expr: increase(pg_stat_database_deadlocks{datname!="nominatim"}[1m]) > 5
468 alertgroup: "{{ $labels.instance }}"
470 new_deadlocks: "{{ $value }}"
471 - alert: postgresql slow queries
472 expr: pg_slow_queries > 0
475 alertgroup: "{{ $labels.instance }}"
477 queries: "{{ $value }}"
480 - alert: prometheus configuration error
481 expr: prometheus_config_last_reload_successful == 0
484 alertgroup: "prometheus"
485 - alert: prometheus target missing
489 alertgroup: "prometheus"
492 - alert: raid array degraded
493 expr: ohai_array_info{status="degraded"} > 0
496 alertgroup: "{{ $labels.instance }}"
497 - alert: raid disk failed
498 expr: ohai_disk_info{status="failed"} > 0
501 alertgroup: "{{ $labels.instance }}"
504 - alert: memory controller errors
505 expr: increase(rasdaemon_mc_events_total[1m]) > 0
508 alertgroup: "{{ $labels.instance }}"
510 new_errors: "{{ $value }}"
511 - alert: pcie aer errors
512 expr: increase(rasdaemon_aer_events_total[1m]) > 0
515 alertgroup: "{{ $labels.instance }}"
517 new_ercrors: "{{ $value }}"
520 - alert: smart failure
521 expr: smart_health_status == 0
524 alertgroup: "{{ $labels.instance }}"
525 - alert: smart ssd wearout approaching
526 expr: smart_percentage_used >= 80
529 alertgroup: "{{ $labels.instance }}"
531 percentage_used: "{{ $value | humanizePercentage }}"
534 - alert: ssl certificate probe failed
535 expr: ssl_probe_success == 0
539 - alert: ssl certificate expiry
540 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
545 expires_in: "{{ $value | humanizeDuration }}"
546 - alert: ssl certificate revoked
547 expr: ssl_ocsp_response_status == 1
551 - alert: ocsp status unknown
552 expr: ssl_ocsp_response_status == 1
558 - alert: statuscake uptime check failing
559 expr: statuscake_uptime{status="down",paused="false"} > 0
562 alertgroup: statuscake
565 - alert: systemd failed service
566 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
569 alertgroup: "{{ $labels.instance }}"
570 - alert: systemd failed chef client service
571 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
574 alertgroup: "{{ $labels.instance }}"
577 - alert: renderd replication delay
578 expr: renderd_replication_delay > 120
583 delay: "{{ $value | humanizeDuration }}"
584 - alert: missed tile rate
585 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
590 miss_rate: "{{ $value | humanizePercentage }}"
593 - alert: clock not synchronising
594 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
597 alertgroup: "{{ $labels.instance }}"
598 - alert: clock skew detected
599 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)
602 alertgroup: "{{ $labels.instance }}"
604 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
607 - alert: web error rate
608 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
613 error_rate: "{{ $value | humanizePercentage }}"
614 - alert: job processing rate
615 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
620 job_processing_rate: "{{ $value | humanizePercentage }}"