{%- from "ntp/map.jinja" import client, monitoring with context %} | |
{%- if client.get('enabled', False) %} | |
server: | |
alert: | |
NtpOffsetTooHigh: | |
{%- set threshold = monitoring.ntp_offset_threshold %} | |
if: >- | |
ntpq_offset >= {{ threshold }} | |
for: 2m | |
labels: | |
severity: warning | |
service: ntp | |
annotations: | |
summary: "NTP offset reached the limit of {{ threshold }}ms{%- raw %}" | |
description: "The NTP offset on the {{ $labels.host }} node is {{ $value }}ms for at least 2 minutes." | |
{%- endraw %} | |
{%- endif %} |