Random Project
Directory > NTP and Time> check_chrony_tracking
NTP and Time

check_chrony_tracking

0 (0)
202
0
0

Thank you for your review!

Your review has been submitted and is pending approval.

Description

###### Overview

`check_chrony_tracking.sh` checks Chrony’s synchronization state and system clock offset using `chronyc tracking`.

It considers Chrony synchronized when the leap status is `Normal` and the stratum is nonzero. It checks the absolute system offset against administrator-defined warning and critical thresholds. Optional jitter thresholds apply to Chrony’s RMS offset, which the plugin reports as jitter.

Unlike checks that verify which peer Chrony selected, this plugin evaluates system-level tracking data and does not depend on the selected NTP source.

###### Features

– Checks synchronization using Chrony’s leap status and stratum
– Checks system offset against warning and critical thresholds
– Optionally monitors RMS offset, reported as jitter
– Supports local and remote Chrony queries
– Returns standard Nagios plugin status codes
– Provides offset and jitter performance data for graphing
– Lightweight Bash implementation

###### Requirements

– Bash
– Chrony (`chronyc`)
– `bc`

###### Example Commands

Threshold values are nonnegative and specified in seconds.

– Offset only: `check_chrony_tracking.sh -w 0.001 -c 0.002`
– Offset and jitter: `check_chrony_tracking.sh -w 0.001,0.010 -c 0.002,0.050`
– Remote host: `check_chrony_tracking.sh -H ntpserver.example.com -w 0.001 -c 0.002`

###### Implementation Note

The current script exits on an offset warning before evaluating jitter thresholds. If the offset is in the warning range while jitter exceeds its critical threshold, the plugin reports `WARNING`.


Project Details

Recommend

To:


From: