Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change offset(nan) and sync(0) to WARNING #7

Closed

Conversation

rodrigogansobarbieri
Copy link

@rodrigogansobarbieri rodrigogansobarbieri commented Aug 14, 2020

Due to network instability in some environments,
the NTP algorithm may discard all servers/peers
temporarily, triggering CRITICAL Nagios alert
"CRITICAL: offset is out of range (nan)".

There are two problems with that alert:

  1. The message is misleading, as offset=nan does
    not mean anything. The worst metric selection
    hides the real alert "CRITICAL: No sync peer selected".
    Therefore, the worst metric selection list is reversed,
    as when "No sync peer selected" happens,
    "offset is out of range (nan)" always happens as well.

  2. The problem is usually transient and does not
    require immediate attention. It may go away with
    network workload changes, or may persist until the
    root cause of the issue is investigated. Given that it
    is of "CRITICAL" level, it obfuscates other much more
    critical alerts from NTPmon and also Nagios. Therefore,
    the WARNING level is more appropriate.

Closes #5

Due to network instability in some environments,
the NTP algorithm may discard all servers/peers
temporarily, triggering CRITICAL Nagios alert
"CRITICAL: offset is out of range (nan)".

There are two problems with that alert:
1) The message is misleading, as offset=nan does
not mean anything. The worst metric selection
hides the real alert "CRITICAL: No sync peer selected".
Therefore, the worst metric selection list is reversed,
as when "No sync peer selected" happens,
"offset is out of range (nan)" always happens as well.

2) The problem is usually transient and does not
require immediate attention. It may go away with
network workload changes, or may persist until the
root cause of the issue is investigated. Given that it
is of "CRITICAL" level, it obfuscates other much more
critical alerts from NTPmon and also Nagios. Therefore,
the WARNING level is more appropriate.

Closes paulgear#5
Copy link
Owner

@paulgear paulgear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rodrigogansobarbieri If it's OK with you, I'm going to close this PR now. I've fixed the NaN problem in a different way, and the downgrading of sync failure from CRITICAL to WARNING is not a change which I'm willing to consider now, since the whole point of NTP is to sync the clock. I think the reversal of the list in worst_metric() is worth thinking about a bit further, and I've created issue #11 to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nagios is triggered with: CRITICAL: offset is out of range (nan) - must be between -0.050000 and 0.050000
2 participants