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"
21 expr: sum(rPDU2PhaseStatusApparentPower{site="amsterdam",rPDU2PhaseStatusIndex="1"} / 100) > 3
24 alertgroup: "amsterdam"
26 current: "{{ $value | humanize }}kVA"
27 - alert: site temperature
28 expr: min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="amsterdam"}) / 10 > 26
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.75
103 alertgroup: "{{ $labels.instance }}"
105 pressure: "{{ $value | humanizePercentage }}"
108 - alert: postgres replication delay
109 expr: pg_replication_lag_seconds > 30
114 delay: "{{ $value | humanizeDuration }}"
117 - alert: discourse job failure rate
118 expr: rate(discourse_job_failures[5m]) > 0
121 alertgroup: discourse
123 failure_rate: "{{ $value }} jobs/s"
126 - alert: pdu current draw
127 expr: rPDU2PhaseStatusCurrent{site="dublin",rPDU2PhaseStatusIndex="1"} / 10 > 13
132 current: "{{ $value | humanize }}A"
133 - alert: site current draw
134 expr: sum(rPDU2PhaseStatusCurrent{site="dublin",rPDU2PhaseStatusIndex="1"} / 10) > 17
139 current: "{{ $value | humanize }}A"
141 expr: sum(rPDU2PhaseStatusApparentPower{site="dublin",rPDU2PhaseStatusIndex="1"} / 100) > 4
146 current: "{{ $value | humanize }}kVA"
147 - alert: site temperature
148 expr: min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 < 18 or min(rPDU2SensorTempHumidityStatusTempC{site="dublin"}) / 10 > 26
153 temperature: "{{ $value | humanize }}C"
154 - alert: site humidity
155 expr: max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 < 0.25 or max(rPDU2SensorTempHumidityStatusRelativeHumidity{site="dublin"}) / 100 > 0.65
160 humidity: "{{ $value | humanizePercentage }}"
163 - alert: fastly error rate
164 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
169 error_rate: "{{ $value | humanizePercentage }}"
170 - alert: fastly healthcheck failing
171 expr: count(fastly_healthcheck_status == 0) by (service) > 0
175 - alert: multiple fastly healthchecks failing
176 expr: count(fastly_healthcheck_status == 0) by (service) > 4
182 - alert: readonly filesystem
183 expr: node_filesystem_readonly > min_over_time(node_filesystem_readonly[7d])
186 alertgroup: "{{ $labels.instance }}"
187 - alert: filesystem low on space
188 expr: node_filesystem_avail_bytes / node_filesystem_size_bytes < 0.05
191 alertgroup: "{{ $labels.instance }}"
193 percentage_free: "{{ $value | humanizePercentage }}"
194 free_bytes: "{{ with printf \"node_filesystem_avail_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
195 total_total: "{{ with printf \"node_filesystem_size_bytes{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value | humanize1024 }}bytes{{end}}"
196 - alert: filesystem low on inodes
197 expr: node_filesystem_files_free / node_filesystem_files < 0.1
200 alertgroup: "{{ $labels.instance }}"
202 percentage_free: "{{ $value | humanizePercentage }}"
203 free_inodes: "{{ with printf \"node_filesystem_files_free{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
204 total_inodes: "{{ with printf \"node_filesystem_files{instance='%s',mountpoint='%s'}\" $labels.instance $labels.mountpoint | query }}{{ . | first | value }}{{end}}"
207 - alert: hwmon fan alarm
208 expr: node_hwmon_fan_alarm == 1
211 alertgroup: "{{ $labels.instance }}"
213 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}}"
214 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}}"
215 - alert: hwmon temperature alarm
216 expr: node_hwmon_temp_alarm == 1
219 alertgroup: "{{ $labels.instance }}"
221 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}}"
222 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}}"
223 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}}"
224 - alert: hwmon voltage alarm
225 expr: node_hwmon_in_alarm == 1
228 alertgroup: "{{ $labels.instance }}"
230 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}}"
231 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}}"
232 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}}"
236 expr: rate(node_pressure_io_waiting_seconds_total[5m]) > 0.6
239 alertgroup: "{{ $labels.instance }}"
241 pressure: "{{ $value | humanizePercentage }}"
244 - alert: ipmi fan alarm
245 expr: ipmi_fan_speed_state > 0
248 alertgroup: "{{ $labels.instance }}"
250 fan_speed_rpm: "{{ with printf \"ipmi_fan_speed_rpm{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}rpm{{end}}"
251 - alert: ipmi temperature alarm
252 expr: ipmi_temperature_state > 0
255 alertgroup: "{{ $labels.instance }}"
257 temperature_celsius: "{{ with printf \"ipmi_temperature_celsius{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}C{{end}}"
258 - alert: ipmi voltage alarm
259 expr: ipmi_voltage_state > 0
262 alertgroup: "{{ $labels.instance }}"
264 voltage_volts: "{{ with printf \"ipmi_voltage_volts{instance='%s',id='%s'}\" $labels.instance $labels.id | query }}{{ . | first | value | humanize }}V{{end}}"
265 - alert: ipmi power alarm
266 expr: ipmi_power_state > 0 or ipmi_sensor_state{type=~"Power .*"} > 0
269 alertgroup: "{{ $labels.instance }}"
272 - alert: juniper cpu alarm
273 expr: jnxOperatingCPU{jnxOperatingContentsIndex="7"} > 30
276 alertgroup: "{{ $labels.site }}"
277 - alert: juniper fan alarm
278 expr: jnxOperatingState{jnxOperatingContentsIndex="4",jnxOperatingState!~"running.*"} > 0
281 alertgroup: "{{ $labels.site }}"
282 - alert: juniper power alarm
283 expr: jnxOperatingState{jnxOperatingContentsIndex="2",jnxOperatingState!~"running.*"} > 0
286 alertgroup: "{{ $labels.site }}"
293 alertgroup: "{{ $labels.instance }}"
294 - alert: exim queue length
295 expr: exim_queue > exim_queue_limit
300 queue_length: "{{ $value }}"
301 - alert: mailman queue length
302 expr: mailman_queue_length > 200
307 queue_length: "{{ $value }}"
310 - alert: mdadm array inactive
311 expr: node_md_state{state="inactive"} > 0
314 alertgroup: "{{ $labels.instance }}"
316 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
317 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
318 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
319 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
320 - alert: mdadm array degraded
321 expr: sum (node_md_disks{state="active"}) without (state) < node_md_disks_required
324 alertgroup: "{{ $labels.instance }}"
326 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
327 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
328 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
329 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
330 - alert: mdadm disk failed
331 expr: node_md_disks{state="failed"} > 0
334 alertgroup: "{{ $labels.instance }}"
336 required: "{{ with printf \"node_md_disks_required{instance='%s',device='%s'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
337 active: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='active'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
338 failed: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='failed'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
339 spare: "{{ with printf \"node_md_disks{instance='%s',device='%s',state='spare'}\" $labels.instance $labels.device | query }}{{ . | first | value | humanize }} disks{{end}}"
343 expr: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes < 0.1
346 alertgroup: "{{ $labels.instance }}"
348 memory_free: "{{ $value | humanizePercentage }}"
349 - alert: memory pressure
350 expr: rate(node_pressure_memory_waiting_seconds_total[5m]) > 0.6
353 alertgroup: "{{ $labels.instance }}"
355 pressure: "{{ $value | humanizePercentage }}"
356 - alert: oom kill detected
357 expr: increase(node_vmstat_oom_kill[1m]) > 0
360 alertgroup: "{{ $labels.instance }}"
362 new_oom_kills: "{{ $value }}"
369 alertgroup: "{{ $labels.instance }}"
370 - alert: mysql connection limit
371 expr: mysql_global_status_max_used_connections / mysql_global_variables_max_connections > 0.8
374 alertgroup: "{{ $labels.instance }}"
376 connections_used: "{{ $value | humanizePercentage }}"
379 - alert: interface transmit rate
380 expr: rate(node_network_transmit_bytes_total[1m]) / node_network_speed_bytes > 0.98
383 alertgroup: "{{ $labels.instance }}"
385 bandwidth_used: "{{ $value | humanizePercentage }}"
386 - alert: interface receive rate
387 expr: rate(node_network_receive_bytes_total[1m]) / node_network_speed_bytes > 0.98
390 alertgroup: "{{ $labels.instance }}"
392 bandwidth_used: "{{ $value | humanizePercentage }}"
393 - alert: interface transmit errors
394 expr: rate(node_network_transmit_errs_total{device!~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device!~"wg.*"}[1m]) > 0.01
397 alertgroup: "{{ $labels.instance }}"
399 error_rate: "{{ $value | humanizePercentage }}"
400 - alert: wireguard interface transmit errors
401 expr: rate(node_network_transmit_errs_total{device=~"wg.*"}[1m]) / rate(node_network_transmit_packets_total{device=~"wg.*"}[1m]) > 0.05
404 alertgroup: "{{ $labels.instance }}"
406 error_rate: "{{ $value | humanizePercentage }}"
407 - alert: interface receive errors
408 expr: rate(node_network_receive_errs_total[1m]) / rate(node_network_receive_packets_total[1m]) > 0.01
411 alertgroup: "{{ $labels.instance }}"
413 error_rate: "{{ $value | humanizePercentage }}"
414 - alert: conntrack entries
415 expr: node_nf_conntrack_entries / node_nf_conntrack_entries_limit > 0.8
418 alertgroup: "{{ $labels.instance }}"
420 entries_used: "{{ $value | humanizePercentage }}"
423 - alert: nominatim replication delay
424 expr: nominatim_replication_delay > 10800
427 alertgroup: nominatim
429 delay: "{{ $value | humanizeDuration }}"
432 - alert: overpass osm database age
433 expr: overpass_database_age_seconds{database="osm"} > 3600
438 age: "{{ $value | humanizeDuration }}"
439 - alert: overpass area database age
440 expr: overpass_database_age_seconds{database="area"} > 86400
445 age: "{{ $value | humanizeDuration }}"
448 - alert: passenger down
449 expr: passenger_up == 0
452 alertgroup: "{{ $labels.instance }}"
453 - alert: passenger queuing
454 expr: passenger_top_level_request_queue > 0
457 alertgroup: "{{ $labels.instance }}"
458 - alert: passenger application queuing
459 expr: passenger_app_request_queue > 0
462 alertgroup: "{{ $labels.instance }}"
465 - alert: planet dump overdue
466 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/(pbf|planet)/.*"} > 7 * 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
471 overdue_by: "{{ $value | humanizeDuration }}"
472 - alert: notes dump overdue
473 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/notes/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
478 overdue_by: "{{ $value | humanizeDuration }}"
479 - alert: daily replication feed delayed
480 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/day/.*"} > 86400 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
485 delayed_by: "{{ $value | humanizeDuration }}"
486 - alert: hourly replication feed delayed
487 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/hour/.*"} > 3600 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
492 delayed_by: "{{ $value | humanizeDuration }}"
493 - alert: minutely replication feed delayed
494 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/minute/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
499 delayed_by: "{{ $value | humanizeDuration }}"
500 - alert: changeset replication feed delayed
501 expr: time() - file_stat_modif_time_seconds{path=~"/store/planet/replication/changesets/.*"} > 60 and ignoring (job, name, path) chef_role{name="planetdump"} == 1
506 delayed_by: "{{ $value | humanizeDuration }}"
509 - alert: postgresql down
513 alertgroup: "{{ $labels.instance }}"
514 - alert: postgresql replication delay
515 expr: pg_replication_lag_seconds > 30
518 alertgroup: "{{ $labels.instance }}"
520 delay: "{{ $value | humanizeDuration }}"
521 - alert: postgresql connection limit
522 expr: sum (pg_stat_activity_count) by (instance, server) / sum (pg_settings_max_connections) by (instance, server) > 0.8
525 alertgroup: "{{ $labels.instance }}"
527 connections_used: "{{ $value | humanizePercentage }}"
528 - alert: postgresql deadlocks
529 expr: increase(pg_stat_database_deadlocks{datname!="nominatim"}[1m]) > 5
532 alertgroup: "{{ $labels.instance }}"
534 new_deadlocks: "{{ $value }}"
535 - alert: postgresql slow queries
536 expr: pg_slow_queries > 0
539 alertgroup: "{{ $labels.instance }}"
541 queries: "{{ $value }}"
544 - alert: prometheus configuration error
545 expr: prometheus_config_last_reload_successful == 0
548 alertgroup: "prometheus"
549 - alert: prometheus target missing
553 alertgroup: "prometheus"
556 - alert: raid controller battery failed
557 expr: ohai_controller_info{battery_status="failed"} > 0
560 alertgroup: "{{ $labels.instance }}"
561 - alert: raid array degraded
562 expr: ohai_array_info{status="degraded"} > 0
565 alertgroup: "{{ $labels.instance }}"
566 - alert: raid disk failed
567 expr: ohai_disk_info{status="failed"} > 0
570 alertgroup: "{{ $labels.instance }}"
573 - alert: memory controller errors
574 expr: increase(rasdaemon_mc_events_total[1m]) > 0
577 alertgroup: "{{ $labels.instance }}"
579 new_errors: "{{ $value }}"
580 - alert: pcie aer errors
581 expr: increase(rasdaemon_aer_events_total[1m]) > 0
584 alertgroup: "{{ $labels.instance }}"
586 new_errors: "{{ $value }}"
589 - alert: smart failure
590 expr: smart_health_status == 0
593 alertgroup: "{{ $labels.instance }}"
594 - alert: smart ssd wearout approaching
595 expr: smart_percentage_used / 100 >= 0.8
598 alertgroup: "{{ $labels.instance }}"
600 percentage_used: "{{ $value | humanizePercentage }}"
604 expr: 1 - (rate(smokeping_response_duration_seconds_count[5m]) / rate(smokeping_requests_total[5m])) > 0.02
607 alertgroup: smokeping
609 loss_rate: "{{ $value | humanizePercentage }}"
612 - alert: snmp pdus missing
613 expr: max_over_time(snmp_scrape_pdus_returned[1d]) - snmp_scrape_pdus_returned > 0
618 missing_pdus: "{{ $value }}"
621 - alert: ssl certificate probe failed
622 expr: ssl_probe_success == 0
626 - alert: ssl certificate expiry
627 expr: ssl_verified_cert_not_after{chain_no="0"} - time() < 86400 * 14
632 expires_in: "{{ $value | humanizeDuration }}"
633 - alert: ssl certificate revoked
634 expr: ssl_ocsp_response_status == 1
638 - alert: ocsp status unknown
639 expr: ssl_ocsp_response_status == 1
645 - alert: statuscake uptime check failing
646 expr: statuscake_paused == 0 and statuscake_up == 0
649 alertgroup: statuscake
652 - alert: systemd failed service
653 expr: node_systemd_unit_state{state="failed",name!="chef-client.service"} == 1
656 alertgroup: "{{ $labels.instance }}"
657 - alert: systemd failed chef client service
658 expr: sum_over_time(node_systemd_unit_state{state="inactive",name="chef-client.service"}[6h]) == 0
661 alertgroup: "{{ $labels.instance }}"
664 - alert: renderd replication delay
665 expr: renderd_replication_delay > 120
670 delay: "{{ $value | humanizeDuration }}"
671 - alert: missed tile rate
672 expr: sum(rate(modtile_http_response_total{code="404"}[5m])) by (instance) / sum(rate(modtile_http_response_total[5m])) by (instance) > 0.05
677 miss_rate: "{{ $value | humanizePercentage }}"
678 - alert: tile render rate
679 expr: sum(rate(renderd_zoom_metatiles_total[5m])) by (instance) == 0
684 render_rate: "{{ $value }} tiles/s"
687 - alert: clock not synchronising
688 expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16
691 alertgroup: "{{ $labels.instance }}"
692 - alert: clock skew detected
693 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)
696 alertgroup: "{{ $labels.instance }}"
698 skew: "{{ with printf \"node_timex_offset_seconds{instance='%s'}\" $labels.instance | query }} {{ . | humanizeDuration }}{{ end }}"
701 - alert: web error rate
702 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
707 error_rate: "{{ $value | humanizePercentage }}"
708 - alert: job processing rate
709 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
714 job_processing_rate: "{{ $value | humanizePercentage }}"