diff options
author | paulfantom <pawel@krupa.net.pl> | 2019-09-10 16:52:12 +0200 |
---|---|---|
committer | paulfantom <pawel@krupa.net.pl> | 2020-03-23 08:23:58 +0100 |
commit | 820f8d595eeec7172b02289ba868bc3867c5f1b4 (patch) | |
tree | 626ecce5daa726ffb60c2c889eeaeaa9462cedf5 | |
parent | 99182a3fe04c800d46df9a3063c57b34932bbc80 (diff) | |
download | prometheus_node_collector-820f8d595eeec7172b02289ba868bc3867c5f1b4.tar.bz2 prometheus_node_collector-820f8d595eeec7172b02289ba868bc3867c5f1b4.tar.xz prometheus_node_collector-820f8d595eeec7172b02289ba868bc3867c5f1b4.zip |
docs/node-mixin: alert on desynchronised clock
Signed-off-by: paulfantom <pawel@krupa.net.pl>
-rw-r--r-- | docs/node-mixin/alerts/alerts.libsonnet | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/node-mixin/alerts/alerts.libsonnet b/docs/node-mixin/alerts/alerts.libsonnet index 6c5ca57..6c2ee3e 100644 --- a/docs/node-mixin/alerts/alerts.libsonnet +++ b/docs/node-mixin/alerts/alerts.libsonnet | |||
@@ -197,6 +197,44 @@ | |||
197 | severity: 'warning', | 197 | severity: 'warning', |
198 | }, | 198 | }, |
199 | }, | 199 | }, |
200 | { | ||
201 | alert: 'NodeClockSkewDetected', | ||
202 | expr: ||| | ||
203 | ( | ||
204 | node_timex_offset_seconds > 0.05 | ||
205 | and | ||
206 | deriv(node_timex_offset_seconds[5m]) >= 0 | ||
207 | ) | ||
208 | or | ||
209 | ( | ||
210 | node_timex_offset_seconds < 0.05 | ||
211 | and | ||
212 | deriv(node_timex_offset_seconds[5m]) <= 0 | ||
213 | ) | ||
214 | ||| % $._config, | ||
215 | 'for': '10m', | ||
216 | labels: { | ||
217 | severity: 'warning', | ||
218 | }, | ||
219 | annotations: { | ||
220 | summary: 'Clock skew detected.', | ||
221 | message: 'Clock on {{ $labels.instance }} is out of sync by more than 300s. Ensure NTP is configured correctly on this host.', | ||
222 | }, | ||
223 | }, | ||
224 | { | ||
225 | alert: 'NodeClockNotSynchronising', | ||
226 | expr: ||| | ||
227 | min_over_time(node_timex_sync_status[5m]) == 0 | ||
228 | ||| % $._config, | ||
229 | 'for': '10m', | ||
230 | labels: { | ||
231 | severity: 'warning', | ||
232 | }, | ||
233 | annotations: { | ||
234 | summary: 'Clock not synchronising.', | ||
235 | message: 'Clock on {{ $labels.instance }} is not synchronising. Ensure NTP is configured on this host.', | ||
236 | }, | ||
237 | }, | ||
200 | ], | 238 | ], |
201 | }, | 239 | }, |
202 | ], | 240 | ], |