From c82762c5691e3cbc27a5d0f4f664cf30c2c51548 Mon Sep 17 00:00:00 2001 From: Dawud M <7688823+technowhizz@users.noreply.github.com> Date: Wed, 4 Jan 2023 17:26:21 +0000 Subject: [PATCH 1/2] Add awesome alerts alert for NTP Change-Id: I80610eeaa5cd7f83b0753af97d53cedbe12c2c86 --- .../kolla/config/prometheus/system.rules | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/etc/kayobe/kolla/config/prometheus/system.rules b/etc/kayobe/kolla/config/prometheus/system.rules index ffc7d25a3..6adf515a6 100644 --- a/etc/kayobe/kolla/config/prometheus/system.rules +++ b/etc/kayobe/kolla/config/prometheus/system.rules @@ -78,4 +78,22 @@ groups: summary: "Host EDAC Uncorrectable Errors detected (instance {{ $labels.instance }})" description: "{{ $labels.instance }} has had {{ printf \"%.0f\" $value }} uncorrectable memory errors reported by EDAC in the last 5 minutes." + - alert: HostClockSkew + 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) + for: 2m + labels: + severity: warning + annotations: + summary: Host clock skew (instance {{ $labels.instance }}) + description: "Clock skew detected. Clock is out of sync. Ensure NTP is configured correctly on this host." + + - alert: HostClockNotSynchronising + expr: min_over_time(node_timex_sync_status[1m]) == 0 and node_timex_maxerror_seconds >= 16 + for: 2m + labels: + severity: warning + annotations: + summary: Host clock not synchronising (instance {{ $labels.instance }}) + description: "Clock not synchronising. Ensure NTP is configured on this host." + {% endraw %} From fe3bb67e1ded5cced548ec0fc4a0ab0fed0be0fa Mon Sep 17 00:00:00 2001 From: Dawud M <7688823+technowhizz@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:24:25 +0000 Subject: [PATCH 2/2] Add release note --- releasenotes/notes/ntp-alerts-0d110b4979457165.yaml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 releasenotes/notes/ntp-alerts-0d110b4979457165.yaml diff --git a/releasenotes/notes/ntp-alerts-0d110b4979457165.yaml b/releasenotes/notes/ntp-alerts-0d110b4979457165.yaml new file mode 100644 index 000000000..62d932cc2 --- /dev/null +++ b/releasenotes/notes/ntp-alerts-0d110b4979457165.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Adds NTP alerts to prometheus alertmanager. \ No newline at end of file