This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify chrony and add some tests (#712)
* simplify chrony and add some tests * update charts * update readme * fix ref_measurement_time on chrony restart * update go.d.conf * update plugin readme * fix tests * fix reviewdog warnings * fix readme
- Loading branch information
Showing
13 changed files
with
948 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,77 @@ | ||
# chrony monitoring with Netdata | ||
|
||
[`chrony`](https://chrony.tuxfamily.org/) is a versatile implementation of the Network Time Protocol (NTP). | ||
|
||
The modules will monitor local host `chrony` server. | ||
|
||
This module use golang to collect chrony and produces: | ||
* stratum | ||
* frequency | ||
* last offset | ||
* RMS offset | ||
* residual freq | ||
* root delay | ||
* root dispersion | ||
* skew | ||
* leap status | ||
* update interval | ||
* current correction | ||
* current source server address | ||
<!-- | ||
title: "Chrony monitoring with Netdata" | ||
custom_edit_url: https://github.com/netdata/go.d.plugin/edit/master/modules/chrony/README.md | ||
sidebar_label: "Chrony" | ||
--> | ||
|
||
# Chrony monitoring with Netdata | ||
|
||
[chrony](https://chrony.tuxfamily.org/) is a versatile implementation of the Network Time Protocol (NTP). | ||
|
||
This module monitors the system's clock performance and peers activity status using Chrony communication protocol v6. | ||
|
||
## Charts | ||
|
||
It produces the following charts: | ||
|
||
- Distance to the reference clock | ||
- Current correction | ||
- Network path delay to stratum-1 | ||
- Dispersion accumulated back to stratum-1 | ||
- Offset on the last clock update | ||
- Long-term average of the offset value | ||
- Frequency | ||
- Residual frequency | ||
- Skew | ||
- Interval between the last two clock updates | ||
- Time since the last measurement | ||
- Leap status | ||
- Peers activity | ||
|
||
## Configuration | ||
|
||
Edit the `go.d/chrony.conf` configuration file using `edit-config` from the | ||
Netdata [config directory](https://learn.netdata.cloud/docs/configure/nodes), which is typically at `/etc/netdata`. | ||
|
||
```bash | ||
cd /etc/netdata # Replace this path with your Netdata config directory, if different | ||
sudo ./edit-config go.d/chrony.conf | ||
``` | ||
|
||
Configuration example: | ||
|
||
```yaml | ||
jobs: | ||
- name: local | ||
address: '127.0.0.1:323' | ||
timeout: 1 | ||
|
||
- name: remote | ||
address: '203.0.113.0:323' | ||
timeout: 3 | ||
``` | ||
For all available options please see | ||
module [configuration file](https://github.com/netdata/go.d.plugin/blob/master/config/go.d/chrony.conf). | ||
--- | ||
## Troubleshooting | ||
To troubleshoot issues with the `chrony` collector, run the `go.d.plugin` with the debug option enabled. The | ||
output should give you clues as to why the collector isn't working. | ||
|
||
First, navigate to your plugins directory, usually at `/usr/libexec/netdata/plugins.d/`. If that's not the case on your | ||
system, open `netdata.conf` and look for the setting `plugins directory`. Once you're in the plugin's directory, switch | ||
to the `netdata` user. | ||
|
||
```bash | ||
cd /usr/libexec/netdata/plugins.d/ | ||
sudo -u netdata -s | ||
``` | ||
|
||
You can now run the `go.d.plugin` to debug the collector: | ||
|
||
```bash | ||
./go.d.plugin -d -m chrony | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.