1 # DO NOT EDIT - This file is being maintained by Chef
7 expr: junos_interface_up{site="amsterdam",name=~"ge-[01]/2/2"} != 1
10 alertgroup: "amsterdam"
12 status: "{{ $value }}"
13 - alert: equinix uplink
14 expr: junos_interface_up{site="amsterdam",name=~"xe-[01]/2/0"} != 1
17 alertgroup: "amsterdam"
19 status: "{{ $value }}"
20 - alert: pdu current draw
21 expr: rPDU2PhaseStatusCurrent{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 10 > 28
24 alertgroup: "amsterdam"
26 current: "{{ $value | humanize }}A"
28 expr: sum(avg_over_time(rPDU2PhaseStatusApparentPower{site="amsterdam",rPDU2PhaseStatusIndex="1"}[1h]) / 100) > 3.5
31 alertgroup: "amsterdam"
33 current: "{{ $value | humanize }}kVA"
34 - alert: site temperature
35 expr: min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 < 15 or min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 > 32
38 alertgroup: "amsterdam"
40 temperature: "{{ $value | humanize }}C"
41 - alert: site humidity
42 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 < 0.08 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="amsterdam"}) / 100 > 0.8
45 alertgroup: "amsterdam"
47 humidity: "{{ $value | humanizePercentage }}"
54 alertgroup: "{{ $labels.instance }}"
55 - alert: apache workers busy
56 expr: sum(apache_workers{state="busy"}) by (instance) / sum(apache_scoreboard) by (instance) > 0.8
59 alertgroup: "{{ $labels.instance }}"
61 busy_workers: "{{ $value | humanizePercentage }}"
62 - alert: apache connection limit
63 expr: (apache_connections{state="total"} - on (instance) apache_connections{state="closing"}) / on (instance) (apache_server_limit * on (instance) (apache_threads_per_child + on (instance) (apache_async_request_worker_factor * on (instance) apache_workers{state="idle"} / on(instance) apache_processes{state="all"}))) > 0.8
66 alertgroup: "{{ $labels.instance }}"
68 connections: "{{ $value | humanizePercentage }}"
71 - alert: chef client not running
72 expr: time() - node_systemd_timer_last_trigger_seconds{name="chef-client.timer"} > 3600
75 alertgroup: "{{ $labels.instance }}"
77 down_time: "{{ $value | humanizeDuration }}"
80 - alert: cisco fan alarm
81 expr: rlPhdUnitEnvParamFan1Status{rlPhdUnitEnvParamFan1Status!="normal"} > 0 or rlPhdUnitEnvParamFan2Status{rlPhdUnitEnvParamFan2Status!="normal"} > 0
84 alertgroup: "{{ $labels.site }}"
86 fan_rpm: "{{ with printf \"rlPhdUnitEnvParamFan1Speed{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}rpm{{end}}"
87 - alert: cisco temperature alarm
88 expr: rlPhdUnitEnvParamTempSensorStatus{rlPhdUnitEnvParamTempSensorStatus!="ok"} > 0
91 alertgroup: "{{ $labels.site }}"
93 temp_celsius: "{{ with printf \"rlPhdUnitEnvParamTempSensorValue{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}C{{end}}"
94 - alert: cisco main power alarm
95 expr: rlPhdUnitEnvParamMainPSStatus{rlPhdUnitEnvParamMainPSStatus!="normal"} > 0
98 alertgroup: "{{ $labels.site }}"
99 - alert: cisco redundant power alarm
100 expr: rlPhdUnitEnvParamRedundantPSStatus{rlPhdUnitEnvParamRedundantPSStatus!="normal"} > 0
103 alertgroup: "{{ $labels.site }}"
106 - alert: cpu pressure
107 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.75
110 alertgroup: "{{ $labels.instance }}"
112 pressure: "{{ $value | humanizePercentage }}"
115 - alert: active rails queries
116 expr: sum(pg_stat_activity_count{datname="openstreetmap",usename="rails",state="active"}) by (instance) > 50 and on (instance) chef_role{name="db-master"}
121 queries: "{{ $value }}"
122 - alert: active cgimap queries
123 expr: sum(pg_stat_activity_count{datname="openstreetmap",usename="cgimap",state="active"}) by (instance) > 30 and on (instance) chef_role{name="db-master"}
128 queries: "{{ $value }}"
131 - alert: discourse job failure rate
132 expr: rate(discourse_job_failures[5m]) > 0
135 alertgroup: discourse
137 failure_rate: "{{ $value }} jobs/s"
141 expr: junos_interface_up{site="dublin",name=~"ge-[01]/2/2"} != 1
146 status: "{{ $value }}"
147 - alert: equinix uplink
148 expr: junos_interface_up{site="dublin",name=~"xe-[01]/2/0"} != 1
153 status: "{{ $value }}"
154 - alert: pdu current draw
155 expr: rPDU2PhaseStatusCurrent{site="dublin",rPDU2PhaseStatusIndex="1"} / 10 > 28
160 current: "{{ $value | humanize }}A"
162 expr: sum(avg_over_time(rPDU2PhaseStatusApparentPower{site="dublin",rPDU2PhaseStatusIndex="1"}[1h]) / 100) > 4
167 current: "{{ $value | humanize }}kVA"
168 - alert: site temperature
169 expr: min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 > 26
174 temperature: "{{ $value | humanize }}C"
175 - alert: site humidity
176 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 < 0.25 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 > 0.65
181 humidity: "{{ $value | humanizePercentage }}"
184 - alert: fastly error rate
185 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
190 error_rate: "{{ $value | humanizePercentage }}"
191 - alert: fastly frontend healthcheck warning
192 expr: count(fastly_healthcheck_status == 0) by (service, datacenter) > 2
196 - alert: fastly frontend healthcheck critical
197 expr: count(fastly_healthcheck_status == 0) by (service, datacenter) == count(fastly_healthcheck_status) by (service, datacenter)
201 - alert: fastly backend healthcheck warning
202 expr: count(fastly_healthcheck_status == 0) by (service, backend) > 10
206 - alert: fastly backend healthcheck critical
207 expr: count(fastly_healthcheck_status == 0) by (service, backend) == count(fastly_healthcheck_status) by (service, backend)
213 - alert: readonly filesystem
214 expr: node_filesystem_readonly > min_over_time(node_filesystem_readonly[7d])
217 alertgroup: "{{ $labels.instance }}"
218 - alert: filesystem low on space
219 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
222 alertgroup: "{{ $labels.instance }}"
224 percentage_free: "{{ $value | humanizePercentage }}"
225 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
226 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
227 - alert: filesystem low on inodes
228 expr: node_filesystem_files_free / node_filesystem_files < 0.1
231 alertgroup: "{{ $labels.instance }}"
233 percentage_free: "{{ $value | humanizePercentage }}"
234 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
235 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
238 - alert: hwmon fan alarm
239 expr: node_hwmon_fan_alarm == 1
242 alertgroup: "{{ $labels.instance }}"
244 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}}"
245 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}}"
246 - alert: hwmon temperature alarm
247 expr: node_hwmon_temp_alarm == 1
250 alertgroup: "{{ $labels.instance }}"
252 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}}"
253 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}}"
254 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}}"
255 - alert: hwmon voltage alarm
256 expr: node_hwmon_in_alarm == 1
259 alertgroup: "{{ $labels.instance }}"
261 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}}"
262 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}}"
263 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}}"
267 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
270 alertgroup: "{{ $labels.instance }}"
272 pressure: "{{ $value | humanizePercentage }}"
275 - alert: ipmi fan alarm
276 expr: ipmi_fan_speed_state > 0
279 alertgroup: "{{ $labels.instance }}"
281 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
282 - alert: ipmi temperature alarm
283 expr: ipmi_temperature_state > 0
286 alertgroup: "{{ $labels.instance }}"
288 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
289 - alert: ipmi voltage alarm
290 expr: ipmi_voltage_state > 0
293 alertgroup: "{{ $labels.instance }}"
295 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
296 - alert: ipmi power alarm
297 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
300 alertgroup: "{{ $labels.instance }}"
303 - alert: juniper red alarms
304 expr: juniper_alarms_red_count > 0
307 alertgroup: "{{ $labels.site }}"
309 alarm_count: "{{ $value }} alarms"
310 - alert: juniper yellow alarms
311 expr: juniper_alarms_yellow_count > 0
314 alertgroup: "{{ $labels.site }}"
316 alarm_count: "{{ $value }} alarms"
317 - alert: juniper cpu alarm
318 expr: junos_route_engine_load_average_five / 2 > 0.5
321 alertgroup: "{{ $labels.site }}"
323 load_average: "{{ $value | humanizePercentage }}"
324 - alert: juniper fan alarm
325 expr: junos_environment_fan_up != 1
328 alertgroup: "{{ $labels.site }}"
329 - alert: juniper power alarm
330 expr: junos_environment_power_up != 1
333 alertgroup: "{{ $labels.site }}"
334 - alert: juniper laser receive power
335 expr: junos_interface_diagnostics_laser_rx_dbm < -12 and on (site, instance, name) junos_interface_admin_up == 1
338 alertgroup: "{{ $labels.site }}"
340 power: "{{ $value }} dBm"
341 - alert: juniper laser transmit power
342 expr: junos_interface_diagnostics_laser_output_dbm < -8 and on (site, instance, name) junos_interface_admin_up == 1
345 alertgroup: "{{ $labels.site }}"
347 power: "{{ $value }} dBm"
350 - alert: load average
351 expr: sum(node_load5) by (instance) / count(node_cpu_frequency_max_hertz) by (instance) > 2
354 alertgroup: "{{ $labels.instance }}"
356 load: "{{ $value | humanizePercentage }}"
363 alertgroup: "{{ $labels.instance }}"
364 - alert: exim queue length
365 expr: exim_queue > ignoring(job) exim_queue_limit
370 queue_length: "{{ $value }}"
371 - alert: mailman queue length
372 expr: mailman_queue_length > 200
377 queue_length: "{{ $value }}"
380 - alert: mdadm array inactive
381 expr: node_md_state{state="inactive"} > 0
384 alertgroup: "{{ $labels.instance }}"
386 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
387 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
388 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
389 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
390 - alert: mdadm array degraded
391 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
394 alertgroup: "{{ $labels.instance }}"
396 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
397 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
398 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
399 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
400 - alert: mdadm disk failed
401 expr: node_md_disks{state="failed"} > 0
404 alertgroup: "{{ $labels.instance }}"
406 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
407 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
408 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
409 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
413 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
416 alertgroup: "{{ $labels.instance }}"
418 memory_free: "{{ $value | humanizePercentage }}"
419 - alert: memory pressure
420 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
423 alertgroup: "{{ $labels.instance }}"
425 pressure: "{{ $value | humanizePercentage }}"
426 - alert: oom kill detected
427 expr: increase(node_vmstat_oom_kill[1m]) > 0
430 alertgroup: "{{ $labels.instance }}"
432 new_oom_kills: "{{ $value }}"
439 alertgroup: "{{ $labels.instance }}"
440 - alert: mysql connection limit
441 expr: mysql_global_status_max_used_connections / mysql_global_variables_max_connections > 0.8
444 alertgroup: "{{ $labels.instance }}"
446 connections_used: "{{ $value | humanizePercentage }}"
447 - alert: mysql connection errors
448 expr: increase(mysql_global_status_connection_errors_total[1m]) > 0
451 alertgroup: "{{ $labels.instance }}"
453 error_count: "{{ $value }}"
456 - alert: interface redundancy lost
457 expr: node_bonding_active < 2 and on (instance, master) label_replace(chef_network_interface{bond_mode="802.3ad"}, "master", "$1", "name", "(.*)")
460 alertgroup: "{{ $labels.instance }}"
462 link_count: "{{ $value }}"
463 - alert: interface transmit rate
464 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.99
467 alertgroup: "{{ $labels.instance }}"
469 bandwidth_used: "{{ $value | humanizePercentage }}"
470 - alert: interface receive rate
471 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.99
474 alertgroup: "{{ $labels.instance }}"
476 bandwidth_used: "{{ $value | humanizePercentage }}"
477 - alert: interface transmit errors
478 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
481 alertgroup: "{{ $labels.instance }}"
483 error_rate: "{{ $value | humanizePercentage }}"
484 - alert: wireguard interface transmit errors
485 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
488 alertgroup: "{{ $labels.instance }}"
490 error_rate: "{{ $value | humanizePercentage }}"
491 - alert: interface receive errors
492 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
495 alertgroup: "{{ $labels.instance }}"
497 error_rate: "{{ $value | humanizePercentage }}"
498 - alert: conntrack entries
499 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
502 alertgroup: "{{ $labels.instance }}"
504 entries_used: "{{ $value | humanizePercentage }}"
507 - alert: nominatim replication delay
508 expr: nominatim_replication_delay > 10800
511 alertgroup: nominatim
513 delay: "{{ $value | humanizeDuration }}"
514 - alert: nominatim connections
515 expr: sum(nginx_connections_writing and on (instance) chef_role{name="nominatim"}) > 2500
518 alertgroup: nominatim
521 - alert: overpass osm database age
522 expr: overpass_database_age_seconds{database="osm"} > 3600
527 age: "{{ $value | humanizeDuration }}"
528 - alert: overpass area database age
529 expr: overpass_database_age_seconds{database="area"} > 86400
534 age: "{{ $value | humanizeDuration }}"
537 - alert: passenger down
538 expr: passenger_up == 0
541 alertgroup: "{{ $labels.instance }}"
542 - alert: passenger queuing
543 expr: passenger_top_level_request_queue > 0
546 alertgroup: "{{ $labels.instance }}"
547 - alert: passenger application queuing
548 expr: passenger_app_request_queue > 0
551 alertgroup: "{{ $labels.instance }}"
554 - alert: planet dump overdue
555 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
560 overdue_by: "{{ $value | humanizeDuration }}"
561 - alert: notes dump overdue
562 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
567 overdue_by: "{{ $value | humanizeDuration }}"
568 - alert: daily replication feed delayed
569 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
574 delayed_by: "{{ $value | humanizeDuration }}"
575 - alert: hourly replication feed delayed
576 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
581 delayed_by: "{{ $value | humanizeDuration }}"
582 - alert: minutely replication feed delayed
583 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
588 delayed_by: "{{ $value | humanizeDuration }}"
589 - alert: changeset replication feed delayed
590 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
595 delayed_by: "{{ $value | humanizeDuration }}"
598 - alert: postgresql down
602 alertgroup: "{{ $labels.instance }}"
603 - alert: postgresql replication delay
604 expr: pg_replication_lag_seconds > 30
607 alertgroup: "{{ $labels.instance }}"
609 delay: "{{ $value | humanizeDuration }}"
610 - alert: postgresql connection limit
611 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
614 alertgroup: "{{ $labels.instance }}"
616 connections_used: "{{ $value | humanizePercentage }}"
617 - alert: postgresql deadlocks
618 expr: increase(pg_stat_database_deadlocks{datname!="nominatim"}[1m]) > 5
621 alertgroup: "{{ $labels.instance }}"
623 new_deadlocks: "{{ $value }}"
624 - alert: postgresql idle transactions
625 expr: sum(pg_process_idle_seconds_count{state="idle in transaction"}) by (instance, server) > sum(pg_process_idle_seconds_bucket{state="idle in transaction",le="300"}) by (instance, server)
628 alertgroup: "{{ $labels.instance }}"
630 queries: "{{ $value }}"
633 - alert: prometheus configuration error
634 expr: prometheus_config_last_reload_successful == 0
637 alertgroup: "prometheus"
638 - alert: prometheus target missing
642 alertgroup: "prometheus"
643 - alert: node exporter text file scrape error
644 expr: node_textfile_scrape_error > 0
647 alertgroup: "prometheus"
650 - alert: raid controller battery failed
651 expr: ohai_controller_info{battery_status="failed"} > 0
654 alertgroup: "{{ $labels.instance }}"
655 - alert: raid controller battery recharging
656 expr: ohai_controller_info{battery_status="recharging"} > 0
659 alertgroup: "{{ $labels.instance }}"
660 - alert: raid array degraded
661 expr: ohai_array_info{status="degraded"} > 0
664 alertgroup: "{{ $labels.instance }}"
665 - alert: raid disk failed
666 expr: ohai_disk_info{status="failed"} > 0
669 alertgroup: "{{ $labels.instance }}"
672 - alert: memory controller errors
673 expr: increase(rasdaemon_mc_events_total[1m]) > 0
676 alertgroup: "{{ $labels.instance }}"
678 new_errors: "{{ $value }}"
679 - alert: pcie aer errors
680 expr: increase(rasdaemon_aer_events_total[1m]) > 0
683 alertgroup: "{{ $labels.instance }}"
685 new_errors: "{{ $value }}"
688 - alert: dnssec validation failures
689 expr: rate(resolved_dnssec_verdicts_total{result="bogus"}[1m]) > 1
692 alertgroup: "{{ $labels.instance }}"
695 - alert: smart failure
696 expr: smart_health_status == 0
699 alertgroup: "{{ $labels.instance }}"
700 - alert: smart ssd wearout approaching
701 expr: smart_percentage_used / 100 >= 0.8
704 alertgroup: "{{ $labels.instance }}"
706 percentage_used: "{{ $value | humanizePercentage }}"
710 expr: 1 - (rate(smokeping_response_duration_seconds_count[5m]) / rate(smokeping_requests_total[5m])) > 0.02
713 alertgroup: smokeping
715 loss_rate: "{{ $value | humanizePercentage }}"
718 - alert: snmp pdus missing
719 expr: max_over_time(snmp_scrape_pdus_returned[1d]) - snmp_scrape_pdus_returned > 0
724 missing_pdus: "{{ $value }}"
727 - alert: ssl certificate probe failed
728 expr: ssl_probe_success == 0
732 - alert: ssl certificate expiry
733 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
738 expires_in: "{{ $value | humanizeDuration }}"
739 - alert: ssl certificate revoked
740 expr: ssl_ocsp_response_status == 1
744 - alert: ocsp status unknown
745 expr: ssl_ocsp_response_status == 1
751 - alert: statuscake uptime check failing
752 expr: statuscake_paused == 0 and statuscake_up == 0
755 alertgroup: statuscake
758 - alert: systemd failed service
759 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
762 alertgroup: "{{ $labels.instance }}"
763 - alert: systemd failed chef client service
764 expr: sum_over_time(node_systemd_unit_state{state="inactive",name="chef-client.service"}[6h]) == 0
767 alertgroup: "{{ $labels.instance }}"
770 - alert: taginfo planet age
771 expr: time() - taginfo_data_from_seconds > 129600 and on (instance) chef_role{name="taginfo"}
776 age: "{{ $value | humanizeDuration }}"
777 - alert: taginfo database age
778 expr: time() - taginfo_database_update_finish_seconds > 129600 and on (instance) chef_role{name="taginfo"}
783 age: "{{ $value | humanizeDuration }}"
784 - alert: taginfo database size
785 expr: abs(delta(taginfo_database_size_bytes[30m])) / taginfo_database_size_bytes > 0.1
790 size_change: "{{ $value | humanizePercentage }}"
793 - alert: renderd replication delay
794 expr: renderd_replication_delay > 120
799 delay: "{{ $value | humanizeDuration }}"
800 - alert: missed tile rate
801 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
806 miss_rate: "{{ $value | humanizePercentage }}"
807 - alert: tile render rate
808 expr: sum(rate(renderd_zoom_metatiles_total[5m])) by (instance) == 0
813 render_rate: "{{ $value }} tiles/s"
816 - alert: clock not synchronising
817 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
820 alertgroup: "{{ $labels.instance }}"
821 - alert: clock skew detected
822 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)
825 alertgroup: "{{ $labels.instance }}"
827 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
830 - alert: web error rate
831 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 and sum(rate(api_call_count_total{status=~"50[0-8]|5[1-9][0-9]"}[5m])) by (instance) > 0.01
836 error_rate: "{{ $value | humanizePercentage }}"
837 - alert: job processing rate
838 expr: rate(pg_stat_user_tables_n_tup_del{datname="openstreetmap",relname="delayed_jobs"}[1h]) / rate(pg_stat_user_tables_n_tup_ins{datname="openstreetmap",relname="delayed_jobs"}[1h]) < 0.9 and ignoring(job, name, datname, relname, schemaname, server) chef_role{name="db-master"} == 1
843 job_processing_rate: "{{ $value | humanizePercentage }}"