monitoring/collectd-extensions
Cole Walker 79cd2ee2b0 Correct logic for checking ptp4l source lock
An update to the check_ptp_regular() function resulted in a case where
the ptp collectd plugin could crash by hitting a KeyError.

This fix prevents this by checking that the key is present before trying
to read the GNSS/SMA status. If the key is not present then we know that
GNSS/SMA is not configured for that NIC and we can skip the check.

Additional improvement: Throttle logs related to UTC offset checking.
There is no need to print these logs every cycle as the state is not
expected to change frequently.

Test plan:
Pass: Verify collectd plugin startup and operation
Pass: Verify ptp source lock alarm is raised when ptp master is lost
Pass: Verify UTC logs are throttled

Closes-Bug: 2070071

Change-Id: I60eb1602671b388b54ac5938e4a306e4321742e7
Signed-off-by: Cole Walker <cole.walker@windriver.com>
2024-09-10 11:35:14 -04:00
..
debian Update collectd-extensions pkg ver based on git 2023-02-17 18:53:43 +00:00
src Correct logic for checking ptp4l source lock 2024-09-10 11:35:14 -04:00
PKG-INFO Align PKG-INFO for Collectd & Influxdb Extensions 2019-07-15 16:53:36 -04:00