ntp_offset

check_ntp_offset

Checks the ntp offset.

Implementation

WindowsLinuxFreeBSDMacOSX

Examples

Default Check

check_ntp_offset
OK - offset 2.1ms from 1.2.3.4 (debian.pool.ntp.org) |...

Example using NRPE and Naemon

Naemon Config

define command{
    command_name         check_nrpe
    command_line         $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$
}

define service {
    host_name            testhost
    service_description  check_ntp_offset
    use                  generic-service
    check_command        check_nrpe!check_ntp_offset!'warn=offset > 50 || offset < -50' 'crit=offset > 100 || offset < -100'
}

Argument Defaults

ArgumentDefault Value
filternone
warningoffset > 50 || offset < -50
criticaloffset > 100 || offset < -100
empty-state3 (UNKNOWN)
empty-syntax%(status) - could not get any ntp data
top-syntax%(status) - ${list}
ok-syntax
detail-syntaxoffset ${offset_seconds:duration} from ${server}

Check Specific Arguments

ArgumentDescription
serverFetch offset from this ntp server(s). First valid response is used.
sourceSet source of time data instead of auto detect. Can be timedatectl, ntpq, chronyc, osx or w32tm

Attributes

Filter Keywords

these can be used in filters and thresholds (along with the default attributes):

AttributeDescription
sourcesource of the ntp metrics
serverntp server name
stratumstratum value (distance to root ntp server)
jitterjitter of the clock in milliseconds
offsettime offset to ntp server in milliseconds
offset_secondstime offset to ntp server in seconds