collectd plugin
- Request send to NTP host(ex: 169.254.169.123, time.google.com, ...)
- Retrive offset
- Put offset to collectd
-host string
destination host. (default "169.254.169.123")
-identifier string
collectd identifier. first tier is replaced to hostname. respect COLLECTD_HOSTNAME environment variable. (default "$COLLECTD_HOSTNAME/exec-timesync/gauge-time_offset")
-interval int
interval(sec). respect COLLECTD_INTERVAL environment variable. (default 60)
-v show version.
-version
show version.
LoadPlugin exec
<Plugin exec>
Exec ubuntu "/usr/local/bin/collectd-plugin-timesync"
</Plugin>
with arguments
LoadPlugin exec
<Plugin exec>
Exec ubuntu "/usr/local/bin/collectd-plugin-timesync" "-host=time.google.com" "-interval=3"
</Plugin>
Syntax
PUTVAL {HOSTNAME}/exec-timesync/gauge-time_offset interval={N} {UNIXTIME}:{OFFSET_USEC}
Example
PUTVAL "admiin01/exec-timesync/gauge-time_offset" interval=60 1632440516:19252.930000
PUTVAL "admiin01/exec-timesync/gauge-time_offset" interval=60 1632440576:16246.657000
...
- Download and extract release artifacts
chmod +x /path/to/collectd-plugin-timesync
mv /path/to/collectd-plugin-timesync /usr/local/bin/.