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 }}"
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 }}"
126 - alert: readonly filesystem
127 expr: node_filesystem_readonly == 1
130 alertgroup: "{{ $labels.instance }}"
131 - alert: filesystem low on space
132 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
135 alertgroup: "{{ $labels.instance }}"
137 percentage_free: "{{ $value | humanizePercentage }}"
138 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
139 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
140 - alert: filesystem low on inodes
141 expr: node_filesystem_files_free / node_filesystem_files < 0.1
144 alertgroup: "{{ $labels.instance }}"
146 percentage_free: "{{ $value | humanizePercentage }}"
147 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
148 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
151 - alert: hwmon fan alarm
152 expr: node_hwmon_fan_alarm == 1
155 alertgroup: "{{ $labels.instance }}"
157 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}}"
158 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}}"
159 - alert: hwmon temperature alarm
160 expr: node_hwmon_temp_alarm == 1
163 alertgroup: "{{ $labels.instance }}"
165 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}}"
166 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}}"
167 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}}"
168 - alert: hwmon voltage alarm
169 expr: node_hwmon_in_alarm == 1
172 alertgroup: "{{ $labels.instance }}"
174 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}}"
175 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}}"
176 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}}"
180 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
183 alertgroup: "{{ $labels.instance }}"
185 pressure: "{{ $value | humanizePercentage }}"
188 - alert: ipmi fan alarm
189 expr: ipmi_fan_speed_state > 0
192 alertgroup: "{{ $labels.instance }}"
194 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
195 - alert: ipmi temperature alarm
196 expr: ipmi_temperature_state > 0
199 alertgroup: "{{ $labels.instance }}"
201 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
202 - alert: ipmi voltage alarm
203 expr: ipmi_voltage_state > 0
206 alertgroup: "{{ $labels.instance }}"
208 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
209 - alert: ipmi power alarm
210 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
213 alertgroup: "{{ $labels.instance }}"
216 - alert: juniper fan alarm
217 expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!="running"} > 0
220 alertgroup: "{{ $labels.site }}"
221 - alert: juniper power alarm
222 expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!="running"} > 0
225 alertgroup: "{{ $labels.site }}"
228 - alert: exim queue length
229 expr: exim_queue > exim_queue_limit
234 queue_length: "{{ $value }}"
235 - alert: mailman queue length
236 expr: mailman_queue_length > 200
241 queue_length: "{{ $value }}"
244 - alert: mdadm array inactive
245 expr: node_md_state{state="inactive"} > 0
248 alertgroup: "{{ $labels.instance }}"
250 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
251 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
252 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
253 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
254 - alert: mdadm array degraded
255 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
258 alertgroup: "{{ $labels.instance }}"
260 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
261 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
262 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
263 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
264 - alert: mdadm disk failed
265 expr: node_md_disks{state="failed"} > 0
268 alertgroup: "{{ $labels.instance }}"
270 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
271 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
272 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
273 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
277 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
280 alertgroup: "{{ $labels.instance }}"
282 memory_free: "{{ $value | humanizePercentage }}"
283 - alert: memory pressure
284 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
287 alertgroup: "{{ $labels.instance }}"
289 pressure: "{{ $value | humanizePercentage }}"
290 - alert: oom kill detected
291 expr: increase(node_vmstat_oom_kill[1m]) > 0
294 alertgroup: "{{ $labels.instance }}"
296 new_oom_kills: "{{ $value }}"
299 - alert: interface transmit rate
300 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
303 alertgroup: "{{ $labels.instance }}"
305 bandwidth_used: "{{ $value | humanizePercentage }}"
306 - alert: interface receive rate
307 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
310 alertgroup: "{{ $labels.instance }}"
312 bandwidth_used: "{{ $value | humanizePercentage }}"
313 - alert: interface transmit errors
314 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
317 alertgroup: "{{ $labels.instance }}"
319 error_rate: "{{ $value | humanizePercentage }}"
320 - alert: interface transmit errors
321 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
324 alertgroup: "{{ $labels.instance }}"
326 error_rate: "{{ $value | humanizePercentage }}"
327 - alert: interface receive errors
328 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
331 alertgroup: "{{ $labels.instance }}"
333 error_rate: "{{ $value | humanizePercentage }}"
334 - alert: conntrack entries
335 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
338 alertgroup: "{{ $labels.instance }}"
340 entries_used: "{{ $value | humanizePercentage }}"
343 - alert: planet dump overdue
344 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
349 overdue_by: "{{ $value | humanizeDuration }}"
350 - alert: notes dump overdue
351 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
356 overdue_by: "{{ $value | humanizeDuration }}"
357 - alert: daily replication feed delayed
358 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
363 delayed_by: "{{ $value | humanizeDuration }}"
364 - alert: hourly replication feed delayed
365 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
370 delayed_by: "{{ $value | humanizeDuration }}"
371 - alert: minutely replication feed delayed
372 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
377 delayed_by: "{{ $value | humanizeDuration }}"
378 - alert: changeset replication feed delayed
379 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
384 delayed_by: "{{ $value | humanizeDuration }}"
387 - alert: postgresql down
391 alertgroup: "{{ $labels.instance }}"
392 - alert: postgresql replication delay
393 expr: pg_replication_lag_seconds > 5
396 alertgroup: "{{ $labels.instance }}"
398 delay: "{{ $value | humanizeDuration }}"
399 - alert: postgresql connection limit
400 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
403 alertgroup: "{{ $labels.instance }}"
405 connections_used: "{{ $value | humanizePercentage }}"
406 - alert: postgresql deadlocks
407 expr: increase(pg_stat_database_deadlocks[1m]) > 5
410 alertgroup: "{{ $labels.instance }}"
412 new_deadlocks: "{{ $value }}"
413 - alert: postgresql slow queries
414 expr: pg_slow_queries > 0
417 alertgroup: "{{ $labels.instance }}"
419 queries: "{{ $value }}"
422 - alert: smart failure
423 expr: smart_health_status == 0
426 alertgroup: "{{ $labels.instance }}"
427 - alert: smart ssd wearout approaching
428 expr: smart_percentage_used >= 90
431 alertgroup: "{{ $labels.instance }}"
433 percentage_used: "{{ $value | humanizePercentage }}"
436 - alert: ssl certificate probe failed
437 expr: ssl_probe_success == 0
441 - alert: ssl certificate expiry
442 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
447 expires_in: "{{ $value | humanizeDuration }}"
448 - alert: ssl certificate revoked
449 expr: ssl_ocsp_response_status == 1
453 - alert: ocsp status unknown
454 expr: ssl_ocsp_response_status == 1
460 - alert: statuscake uptime check failing
461 expr: statuscake_uptime{status="down",paused="false"} > 0
464 alertgroup: statuscake
467 - alert: systemd failed service
468 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
471 alertgroup: "{{ $labels.instance }}"
472 - alert: systemd failed service
473 expr: node_systemd_unit_state{state="failed",name="chef-client.service"} == 1
476 alertgroup: "{{ $labels.instance }}"
479 - alert: renderd replication delay
480 expr: renderd_replication_delay > 120
485 delay: "{{ $value | humanizeDuration }}"
486 - alert: missed tile rate
487 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
492 miss_rate: "{{ $value | humanizePercentage }}"
495 - alert: clock not synchronising
496 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
499 alertgroup: "{{ $labels.instance }}"
500 - alert: clock skew detected
501 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)
504 alertgroup: "{{ $labels.instance }}"
506 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
509 - alert: web error rate
510 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
515 error_rate: "{{ $value | humanizePercentage }}"
516 - alert: job processing rate
517 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
522 job_processing_rate: "{{ $value | humanizePercentage }}"