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 }}"
55 - alert: apache low request rate
56 expr: rate(apache_accesses_total[5m]) / rate(apache_accesses_total[1h] offset 1w) < 0.25 and rate(apache_accesses_total[1h] offset 1w) > 2
59 alertgroup: "{{ $labels.instance }}"
61 request_rate: "{{ $value | humanizePercentage }}"
64 - alert: chef client not running
65 expr: time() - node_systemd_timer_last_trigger_seconds{name="chef-client.timer"} > 3600
68 alertgroup: "{{ $labels.instance }}"
70 down_time: "{{ $value | humanizeDuration }}"
73 - alert: cisco fan alarm
74 expr: rlPhdUnitEnvParamFan1Status{rlPhdUnitEnvParamFan1Status!="normal"} > 0 or rlPhdUnitEnvParamFan2Status{rlPhdUnitEnvParamFan2Status!="normal"} > 0
77 alertgroup: "{{ $labels.site }}"
79 fan_rpm: "{{ with printf \"rlPhdUnitEnvParamFan1Speed{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}rpm{{end}}"
80 - alert: cisco temperature alarm
81 expr: rlPhdUnitEnvParamTempSensorStatus{rlPhdUnitEnvParamTempSensorStatus!="ok"} > 0
84 alertgroup: "{{ $labels.site }}"
86 temp_celsius: "{{ with printf \"rlPhdUnitEnvParamTempSensorValue{site='%s',instance='%s',rlPhdUnitEnvParamStackUnit='%s'}\" $labels.site $labels.instance $labels.rlPhdUnitEnvParamStackUnit | query }}{{ . | first | value | humanize }}C{{end}}"
87 - alert: cisco main power alarm
88 expr: rlPhdUnitEnvParamMainPSStatus{rlPhdUnitEnvParamMainPSStatus!="normal"} > 0
91 alertgroup: "{{ $labels.site }}"
92 - alert: cisco redundant power alarm
93 expr: rlPhdUnitEnvParamRedundantPSStatus{rlPhdUnitEnvParamRedundantPSStatus!="normal"} > 0
96 alertgroup: "{{ $labels.site }}"
100 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.6
103 alertgroup: "{{ $labels.instance }}"
105 pressure: "{{ $value | humanizePercentage }}"
108 - alert: postgres replication delay
109 expr: pg_replication_lag_seconds > 5
114 delay: "{{ $value | humanizeDuration }}"
117 - alert: fastly error rate
118 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
123 error_rate: "{{ $value | humanizePercentage }}"
124 - alert: fastly healthcheck failing
125 expr: fastly_healthcheck_status == 0
131 - alert: readonly filesystem
132 expr: node_filesystem_readonly == 1
135 alertgroup: "{{ $labels.instance }}"
136 - alert: filesystem low on space
137 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
140 alertgroup: "{{ $labels.instance }}"
142 percentage_free: "{{ $value | humanizePercentage }}"
143 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
144 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
145 - alert: filesystem low on inodes
146 expr: node_filesystem_files_free / node_filesystem_files < 0.1
149 alertgroup: "{{ $labels.instance }}"
151 percentage_free: "{{ $value | humanizePercentage }}"
152 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
153 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
156 - alert: hwmon fan alarm
157 expr: node_hwmon_fan_alarm == 1
160 alertgroup: "{{ $labels.instance }}"
162 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}}"
163 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}}"
164 - alert: hwmon temperature alarm
165 expr: node_hwmon_temp_alarm == 1
168 alertgroup: "{{ $labels.instance }}"
170 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}}"
171 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}}"
172 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}}"
173 - alert: hwmon voltage alarm
174 expr: node_hwmon_in_alarm == 1
177 alertgroup: "{{ $labels.instance }}"
179 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}}"
180 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}}"
181 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}}"
185 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
188 alertgroup: "{{ $labels.instance }}"
190 pressure: "{{ $value | humanizePercentage }}"
193 - alert: ipmi fan alarm
194 expr: ipmi_fan_speed_state > 0
197 alertgroup: "{{ $labels.instance }}"
199 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
200 - alert: ipmi temperature alarm
201 expr: ipmi_temperature_state > 0
204 alertgroup: "{{ $labels.instance }}"
206 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
207 - alert: ipmi voltage alarm
208 expr: ipmi_voltage_state > 0
211 alertgroup: "{{ $labels.instance }}"
213 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
214 - alert: ipmi power alarm
215 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
218 alertgroup: "{{ $labels.instance }}"
221 - alert: juniper fan alarm
222 expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"} > 0
225 alertgroup: "{{ $labels.site }}"
226 - alert: juniper power alarm
227 expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"} > 0
230 alertgroup: "{{ $labels.site }}"
233 - alert: exim queue length
234 expr: exim_queue > exim_queue_limit
239 queue_length: "{{ $value }}"
240 - alert: mailman queue length
241 expr: mailman_queue_length > 200
246 queue_length: "{{ $value }}"
249 - alert: mdadm array inactive
250 expr: node_md_state{state="inactive"} > 0
253 alertgroup: "{{ $labels.instance }}"
255 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
256 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
257 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
258 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
259 - alert: mdadm array degraded
260 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
263 alertgroup: "{{ $labels.instance }}"
265 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
266 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
267 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
268 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
269 - alert: mdadm disk failed
270 expr: node_md_disks{state="failed"} > 0
273 alertgroup: "{{ $labels.instance }}"
275 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
276 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
277 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
278 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
282 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
285 alertgroup: "{{ $labels.instance }}"
287 memory_free: "{{ $value | humanizePercentage }}"
288 - alert: memory pressure
289 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
292 alertgroup: "{{ $labels.instance }}"
294 pressure: "{{ $value | humanizePercentage }}"
295 - alert: oom kill detected
296 expr: increase(node_vmstat_oom_kill[1m]) > 0
299 alertgroup: "{{ $labels.instance }}"
301 new_oom_kills: "{{ $value }}"
304 - alert: interface transmit rate
305 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
308 alertgroup: "{{ $labels.instance }}"
310 bandwidth_used: "{{ $value | humanizePercentage }}"
311 - alert: interface receive rate
312 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
315 alertgroup: "{{ $labels.instance }}"
317 bandwidth_used: "{{ $value | humanizePercentage }}"
318 - alert: interface transmit errors
319 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
322 alertgroup: "{{ $labels.instance }}"
324 error_rate: "{{ $value | humanizePercentage }}"
325 - alert: interface transmit errors
326 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
329 alertgroup: "{{ $labels.instance }}"
331 error_rate: "{{ $value | humanizePercentage }}"
332 - alert: interface receive errors
333 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
336 alertgroup: "{{ $labels.instance }}"
338 error_rate: "{{ $value | humanizePercentage }}"
339 - alert: conntrack entries
340 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
343 alertgroup: "{{ $labels.instance }}"
345 entries_used: "{{ $value | humanizePercentage }}"
348 - alert: planet dump overdue
349 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
354 overdue_by: "{{ $value | humanizeDuration }}"
355 - alert: notes dump overdue
356 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
361 overdue_by: "{{ $value | humanizeDuration }}"
362 - alert: daily replication feed delayed
363 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
368 delayed_by: "{{ $value | humanizeDuration }}"
369 - alert: hourly replication feed delayed
370 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
375 delayed_by: "{{ $value | humanizeDuration }}"
376 - alert: minutely replication feed delayed
377 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
382 delayed_by: "{{ $value | humanizeDuration }}"
383 - alert: changeset replication feed delayed
384 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
389 delayed_by: "{{ $value | humanizeDuration }}"
392 - alert: postgresql down
396 alertgroup: "{{ $labels.instance }}"
397 - alert: postgresql replication delay
398 expr: pg_replication_lag_seconds > 5
401 alertgroup: "{{ $labels.instance }}"
403 delay: "{{ $value | humanizeDuration }}"
404 - alert: postgresql connection limit
405 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
408 alertgroup: "{{ $labels.instance }}"
410 connections_used: "{{ $value | humanizePercentage }}"
411 - alert: postgresql deadlocks
412 expr: increase(pg_stat_database_deadlocks[1m]) > 5
415 alertgroup: "{{ $labels.instance }}"
417 new_deadlocks: "{{ $value }}"
418 - alert: postgresql slow queries
419 expr: pg_slow_queries > 0
422 alertgroup: "{{ $labels.instance }}"
424 queries: "{{ $value }}"
427 - alert: raid array degraded
428 expr: ohai_array_info{status="degraded"} > 0
431 alertgroup: "{{ $labels.instance }}"
432 - alert: raid disk failed
433 expr: ohai_disk_info{status="failed"} > 0
436 alertgroup: "{{ $labels.instance }}"
439 - alert: smart failure
440 expr: smart_health_status == 0
443 alertgroup: "{{ $labels.instance }}"
444 - alert: smart ssd wearout approaching
445 expr: smart_percentage_used >= 90
448 alertgroup: "{{ $labels.instance }}"
450 percentage_used: "{{ $value | humanizePercentage }}"
453 - alert: ssl certificate probe failed
454 expr: ssl_probe_success == 0
458 - alert: ssl certificate expiry
459 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
464 expires_in: "{{ $value | humanizeDuration }}"
465 - alert: ssl certificate revoked
466 expr: ssl_ocsp_response_status == 1
470 - alert: ocsp status unknown
471 expr: ssl_ocsp_response_status == 1
477 - alert: statuscake uptime check failing
478 expr: statuscake_uptime{status="down",paused="false"} > 0
481 alertgroup: statuscake
484 - alert: systemd failed service
485 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
488 alertgroup: "{{ $labels.instance }}"
489 - alert: systemd failed service
490 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
493 alertgroup: "{{ $labels.instance }}"
496 - alert: renderd replication delay
497 expr: renderd_replication_delay > 120
502 delay: "{{ $value | humanizeDuration }}"
503 - alert: missed tile rate
504 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
509 miss_rate: "{{ $value | humanizePercentage }}"
512 - alert: clock not synchronising
513 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
516 alertgroup: "{{ $labels.instance }}"
517 - alert: clock skew detected
518 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)
521 alertgroup: "{{ $labels.instance }}"
523 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
526 - alert: web error rate
527 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
532 error_rate: "{{ $value | humanizePercentage }}"
533 - alert: job processing rate
534 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
539 job_processing_rate: "{{ $value | humanizePercentage }}"