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: fastly error rate
111 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
116 error_rate: "{{ $value | humanizePercentage }}"
117 - alert: fastly healthcheck failing
118 expr: count(fastly_healthcheck_status == 0) > 0
122 - alert: multipe fastly healthchecks failing
123 expr: count(fastly_healthcheck_status == 0) > 4
129 - alert: readonly filesystem
130 expr: node_filesystem_readonly == 1
133 alertgroup: "{{ $labels.instance }}"
134 - alert: filesystem low on space
135 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
138 alertgroup: "{{ $labels.instance }}"
140 percentage_free: "{{ $value | humanizePercentage }}"
141 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
142 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
143 - alert: filesystem low on inodes
144 expr: node_filesystem_files_free / node_filesystem_files < 0.1
147 alertgroup: "{{ $labels.instance }}"
149 percentage_free: "{{ $value | humanizePercentage }}"
150 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
151 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
154 - alert: hwmon fan alarm
155 expr: node_hwmon_fan_alarm == 1
158 alertgroup: "{{ $labels.instance }}"
160 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}}"
161 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}}"
162 - alert: hwmon temperature alarm
163 expr: node_hwmon_temp_alarm == 1
166 alertgroup: "{{ $labels.instance }}"
168 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}}"
169 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}}"
170 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}}"
171 - alert: hwmon voltage alarm
172 expr: node_hwmon_in_alarm == 1
175 alertgroup: "{{ $labels.instance }}"
177 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}}"
178 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}}"
179 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}}"
183 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
186 alertgroup: "{{ $labels.instance }}"
188 pressure: "{{ $value | humanizePercentage }}"
191 - alert: ipmi fan alarm
192 expr: ipmi_fan_speed_state > 0
195 alertgroup: "{{ $labels.instance }}"
197 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
198 - alert: ipmi temperature alarm
199 expr: ipmi_temperature_state > 0
202 alertgroup: "{{ $labels.instance }}"
204 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
205 - alert: ipmi voltage alarm
206 expr: ipmi_voltage_state > 0
209 alertgroup: "{{ $labels.instance }}"
211 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
212 - alert: ipmi power alarm
213 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
216 alertgroup: "{{ $labels.instance }}"
219 - alert: juniper fan alarm
220 expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"} > 0
223 alertgroup: "{{ $labels.site }}"
224 - alert: juniper power alarm
225 expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"} > 0
228 alertgroup: "{{ $labels.site }}"
231 - alert: exim queue length
232 expr: exim_queue > exim_queue_limit
237 queue_length: "{{ $value }}"
238 - alert: mailman queue length
239 expr: mailman_queue_length > 200
244 queue_length: "{{ $value }}"
247 - alert: mdadm array inactive
248 expr: node_md_state{state="inactive"} > 0
251 alertgroup: "{{ $labels.instance }}"
253 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
254 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
255 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
256 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
257 - alert: mdadm array degraded
258 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
261 alertgroup: "{{ $labels.instance }}"
263 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
264 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
265 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
266 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
267 - alert: mdadm disk failed
268 expr: node_md_disks{state="failed"} > 0
271 alertgroup: "{{ $labels.instance }}"
273 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
274 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
275 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
276 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
280 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
283 alertgroup: "{{ $labels.instance }}"
285 memory_free: "{{ $value | humanizePercentage }}"
286 - alert: memory pressure
287 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
290 alertgroup: "{{ $labels.instance }}"
292 pressure: "{{ $value | humanizePercentage }}"
293 - alert: oom kill detected
294 expr: increase(node_vmstat_oom_kill[1m]) > 0
297 alertgroup: "{{ $labels.instance }}"
299 new_oom_kills: "{{ $value }}"
302 - alert: interface transmit rate
303 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
306 alertgroup: "{{ $labels.instance }}"
308 bandwidth_used: "{{ $value | humanizePercentage }}"
309 - alert: interface receive rate
310 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
313 alertgroup: "{{ $labels.instance }}"
315 bandwidth_used: "{{ $value | humanizePercentage }}"
316 - alert: interface transmit errors
317 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
320 alertgroup: "{{ $labels.instance }}"
322 error_rate: "{{ $value | humanizePercentage }}"
323 - alert: wireguard interface transmit errors
324 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
327 alertgroup: "{{ $labels.instance }}"
329 error_rate: "{{ $value | humanizePercentage }}"
330 - alert: interface receive errors
331 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
334 alertgroup: "{{ $labels.instance }}"
336 error_rate: "{{ $value | humanizePercentage }}"
337 - alert: conntrack entries
338 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
341 alertgroup: "{{ $labels.instance }}"
343 entries_used: "{{ $value | humanizePercentage }}"
346 - alert: nominatim replication delay
347 expr: nominatim_replication_delay > 10800
350 alertgroup: nominatim
352 delay: "{{ $value | humanizeDuration }}"
355 - alert: overpass osm database age
356 expr: overpass_database_age_seconds{database="osm"} > 300
361 age: "{{ $value | humanizeDuration }}"
362 - alert: overpass area database age
363 expr: overpass_database_age_seconds{database="area"} > 86400
368 age: "{{ $value | humanizeDuration }}"
371 - alert: planet dump overdue
372 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
377 overdue_by: "{{ $value | humanizeDuration }}"
378 - alert: notes dump overdue
379 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
384 overdue_by: "{{ $value | humanizeDuration }}"
385 - alert: daily replication feed delayed
386 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
391 delayed_by: "{{ $value | humanizeDuration }}"
392 - alert: hourly replication feed delayed
393 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
398 delayed_by: "{{ $value | humanizeDuration }}"
399 - alert: minutely replication feed delayed
400 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
405 delayed_by: "{{ $value | humanizeDuration }}"
406 - alert: changeset replication feed delayed
407 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
412 delayed_by: "{{ $value | humanizeDuration }}"
415 - alert: postgresql down
419 alertgroup: "{{ $labels.instance }}"
420 - alert: postgresql replication delay
421 expr: pg_replication_lag_seconds > 5
424 alertgroup: "{{ $labels.instance }}"
426 delay: "{{ $value | humanizeDuration }}"
427 - alert: postgresql connection limit
428 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
431 alertgroup: "{{ $labels.instance }}"
433 connections_used: "{{ $value | humanizePercentage }}"
434 - alert: postgresql deadlocks
435 expr: increase(pg_stat_database_deadlocks{datname!="nominatim"}[1m]) > 5
438 alertgroup: "{{ $labels.instance }}"
440 new_deadlocks: "{{ $value }}"
441 - alert: postgresql slow queries
442 expr: pg_slow_queries > 0
445 alertgroup: "{{ $labels.instance }}"
447 queries: "{{ $value }}"
450 - alert: prometheus configuration error
451 expr: prometheus_config_last_reload_successful == 0
454 alertgroup: "prometheus"
455 - alert: prometheus target missing
459 alertgroup: "prometheus"
462 - alert: raid array degraded
463 expr: ohai_array_info{status="degraded"} > 0
466 alertgroup: "{{ $labels.instance }}"
467 - alert: raid disk failed
468 expr: ohai_disk_info{status="failed"} > 0
471 alertgroup: "{{ $labels.instance }}"
474 - alert: memory controller errors
475 expr: increase(rasdaemon_mc_events_total[1m]) > 0
478 alertgroup: "{{ $labels.instance }}"
480 new_errors: "{{ $value }}"
481 - alert: pcie aer errors
482 expr: increase(rasdaemon_aer_events_total[1m]) > 0
485 alertgroup: "{{ $labels.instance }}"
487 new_ercrors: "{{ $value }}"
490 - alert: smart failure
491 expr: smart_health_status == 0
494 alertgroup: "{{ $labels.instance }}"
495 - alert: smart ssd wearout approaching
496 expr: smart_percentage_used >= 80
499 alertgroup: "{{ $labels.instance }}"
501 percentage_used: "{{ $value | humanizePercentage }}"
504 - alert: ssl certificate probe failed
505 expr: ssl_probe_success == 0
509 - alert: ssl certificate expiry
510 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
515 expires_in: "{{ $value | humanizeDuration }}"
516 - alert: ssl certificate revoked
517 expr: ssl_ocsp_response_status == 1
521 - alert: ocsp status unknown
522 expr: ssl_ocsp_response_status == 1
528 - alert: statuscake uptime check failing
529 expr: statuscake_uptime{status="down",paused="false"} > 0
532 alertgroup: statuscake
535 - alert: systemd failed service
536 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
539 alertgroup: "{{ $labels.instance }}"
540 - alert: systemd failed chef client service
541 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
544 alertgroup: "{{ $labels.instance }}"
547 - alert: renderd replication delay
548 expr: renderd_replication_delay > 120
553 delay: "{{ $value | humanizeDuration }}"
554 - alert: missed tile rate
555 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
560 miss_rate: "{{ $value | humanizePercentage }}"
563 - alert: clock not synchronising
564 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
567 alertgroup: "{{ $labels.instance }}"
568 - alert: clock skew detected
569 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)
572 alertgroup: "{{ $labels.instance }}"
574 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
577 - alert: web error rate
578 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
583 error_rate: "{{ $value | humanizePercentage }}"
584 - alert: job processing rate
585 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
590 job_processing_rate: "{{ $value | humanizePercentage }}"