1 # DO NOT EDIT - This file is being maintained by Chef
6 - alert: prometheus target missing
10 alertgroup: "prometheus"
17 alertgroup: "{{ $labels.instance }}"
18 - alert: apache workers busy
19 expr: sum(apache_workers{state="busy"}) by (instance) / sum(apache_scoreboard) by (instance) > 0.8
22 alertgroup: "{{ $labels.instance }}"
24 busy_workers: "{{ $value | humanizePercentage }}"
28 expr: rate(node_pressure_cpu_waiting_seconds_total[5m]) > 0.3
31 alertgroup: "{{ $labels.instance }}"
33 pressure: "{{ $value | humanizePercentage }}"
36 - alert: postgres replication delay
37 expr: pg_replication_lag_seconds > 5
42 delay: "{{ $value | humanizeDuration }}"
46 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
51 error_rate: "{{ $value | humanizePercentage }}"
54 - alert: readonly filesystem
55 expr: node_filesystem_readonly == 1
58 alertgroup: "{{ $labels.instance }}"
59 - alert: filesystem low on space
60 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
63 alertgroup: "{{ $labels.instance }}"
65 percentage_free: "{{ $value | humanizePercentage }}"
66 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
67 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
68 - alert: filesystem low on inodes
69 expr: node_filesystem_files_free / node_filesystem_files < 0.1
72 alertgroup: "{{ $labels.instance }}"
74 percentage_free: "{{ $value | humanizePercentage }}"
75 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
76 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
79 - alert: hwmon fan alarm
80 expr: node_hwmon_fan_alarm == 1
83 alertgroup: "{{ $labels.instance }}"
85 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}}"
86 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}}"
87 - alert: hwmon temperature alarm
88 expr: node_hwmon_temp_alarm == 1
91 alertgroup: "{{ $labels.instance }}"
93 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}}"
94 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}}"
95 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}}"
96 - alert: hwmon voltage alarm
97 expr: node_hwmon_in_alarm == 1
100 alertgroup: "{{ $labels.instance }}"
102 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}}"
103 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}}"
104 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}}"
108 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
111 alertgroup: "{{ $labels.instance }}"
113 pressure: "{{ $value | humanizePercentage }}"
116 - alert: ipmi fan alarm
117 expr: ipmi_fan_speed_state > 0
120 alertgroup: "{{ $labels.instance }}"
122 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
123 - alert: ipmi temperature alarm
124 expr: ipmi_temperature_state > 0
127 alertgroup: "{{ $labels.instance }}"
129 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
130 - alert: ipmi voltage alarm
131 expr: ipmi_voltage_state > 0
134 alertgroup: "{{ $labels.instance }}"
136 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
137 - alert: ipmi power alarm
138 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
141 alertgroup: "{{ $labels.instance }}"
144 - alert: exim queue length
145 expr: exim_queue > exim_queue_limit
150 queue_length: "{{ $value }}"
151 - alert: mailman queue length
152 expr: mailman_queue_length > 200
157 queue_length: "{{ $value }}"
160 - alert: mdadm array inactive
161 expr: node_md_state{state="inactive"} > 0
164 alertgroup: "{{ $labels.instance }}"
166 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
167 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
168 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
169 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
170 - alert: mdadm array degraded
171 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
174 alertgroup: "{{ $labels.instance }}"
176 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
177 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
178 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
179 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
180 - alert: mdadm disk failed
181 expr: node_md_disks{state="failed"} > 0
184 alertgroup: "{{ $labels.instance }}"
186 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
187 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
188 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
189 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
193 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
196 alertgroup: "{{ $labels.instance }}"
198 memory_free: "{{ $value | humanizePercentage }}"
199 - alert: memory pressure
200 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
203 alertgroup: "{{ $labels.instance }}"
205 pressure: "{{ $value | humanizePercentage }}"
206 - alert: oom kill detected
207 expr: increase(node_vmstat_oom_kill[1m]) > 0
210 alertgroup: "{{ $labels.instance }}"
212 new_oom_kills: "{{ $value }}"
215 - alert: interface transmit rate
216 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
219 alertgroup: "{{ $labels.instance }}"
221 bandwidth_used: "{{ $value | humanizePercentage }}"
222 - alert: interface receive rate
223 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
226 alertgroup: "{{ $labels.instance }}"
228 bandwidth_used: "{{ $value | humanizePercentage }}"
229 - alert: interface transmit errors
230 expr: rate(node_network_transmit_errs_total[1m]) / rate(node_network_transmit_packets_total[1m]) > 0.01
233 alertgroup: "{{ $labels.instance }}"
235 error_rate: "{{ $value | humanizePercentage }}"
236 - alert: interface receive errors
237 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
240 alertgroup: "{{ $labels.instance }}"
242 error_rate: "{{ $value | humanizePercentage }}"
243 - alert: conntrack entries
244 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
247 alertgroup: "{{ $labels.instance }}"
249 entries_used: "{{ $value | humanizePercentage }}"
252 - alert: planet dump overdue
253 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
258 overdue_by: "{{ $value | humanizeDuration }}"
259 - alert: notes dump overdue
260 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
265 overdue_by: "{{ $value | humanizeDuration }}"
266 - alert: daily replication feed delayed
267 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
272 delayed_by: "{{ $value | humanizeDuration }}"
273 - alert: hourly replication feed delayed
274 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
279 delayed_by: "{{ $value | humanizeDuration }}"
280 - alert: minutely replication feed delayed
281 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
286 delayed_by: "{{ $value | humanizeDuration }}"
287 - alert: changeset replication feed delayed
288 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
293 delayed_by: "{{ $value | humanizeDuration }}"
296 - alert: postgresql down
300 alertgroup: "{{ $labels.instance }}"
301 - alert: postgresql replication delay
302 expr: pg_replication_lag_seconds > 5
305 alertgroup: "{{ $labels.instance }}"
307 delay: "{{ $value | humanizeDuration }}"
308 - alert: postgresql connection limit
309 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
312 alertgroup: "{{ $labels.instance }}"
314 connections_used: "{{ $value | humanizePercentage }}"
315 - alert: postgresql deadlocks
316 expr: increase(pg_stat_database_deadlocks[1m]) > 5
319 alertgroup: "{{ $labels.instance }}"
321 new_deadlocks: "{{ $value }}"
322 - alert: postgresql slow queries
323 expr: pg_slow_queries > 0
326 alertgroup: "{{ $labels.instance }}"
328 queries: "{{ $value }}"
331 - alert: smart failure
332 expr: smart_health_status == 0
335 alertgroup: "{{ $labels.instance }}"
336 - alert: smart ssd wearout approaching
337 expr: smart_percentage_used >= 90
340 alertgroup: "{{ $labels.instance }}"
342 percentage_used: "{{ $value | humanizePercentage }}"
345 - alert: ssl certificate probe failed
346 expr: ssl_probe_success == 0
350 - alert: ssl certificate expiry
351 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
356 expires_in: "{{ $value | humanizeDuration }}"
357 - alert: ssl certificate revoked
358 expr: ssl_ocsp_response_status == 1
362 - alert: ocsp status unknown
363 expr: ssl_ocsp_response_status == 1
369 - alert: systemd failed service
370 expr: node_systemd_unit_state{state="failed"} == 1
373 alertgroup: "{{ $labels.instance }}"
376 - alert: renderd replication delay
377 expr: renderd_replication_delay > 120
382 delay: "{{ $value | humanizeDuration }}"
383 - alert: missed tile rate
384 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
389 miss_rate: "{{ $value | humanizePercentage }}"
392 - alert: clock not synchronising
393 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
396 alertgroup: "{{ $labels.instance }}"
397 - alert: clock skew detected
398 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)
401 alertgroup: "{{ $labels.instance }}"
403 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
406 - alert: web error rate
407 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
412 error_rate: "{{ $value | humanizePercentage }}"
413 - alert: job processing rate
414 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
419 job_processing_rate: "{{ $value | humanizePercentage }}"