alerts: Replace ntp with timex metrics
A local ntp server is optional, while timex is in kernel and always present. Some ntp daemons like chrony can also only be run in a client mode, which synchronizes the kernel but doesn't expose an ntp server. Using the timex metrics is a more reliable approach.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
message: 'Clock skew detected on node-exporter {{ $labels.namespace }}/{{ $labels.pod }}. Ensure NTP is configured correctly on this host.',
|
||||
},
|
||||
expr: |||
|
||||
node_ntp_offset_seconds{%(nodeExporterSelector)s} < -0.03 or node_ntp_offset_seconds{%(nodeExporterSelector)s} > 0.03
|
||||
abs(node_timex_offset_seconds{%(nodeExporterSelector)s}) > 0.03
|
||||
||| % $._config,
|
||||
'for': '2m',
|
||||
labels: {
|
||||
|
||||
Reference in New Issue
Block a user