Baka
Menu

Monitoring of ntpd status and clock diff

Xymon script to check ntp sync status on ntp sources and send non-green status if the time is not in sync with local time by defined max offset of seconds.

Installation:
Client-side:
Download and copy ntpd.sh to xymon ext directory.
Create new file /etc/xymon/clientlaunch.d/ntpd.cfg:

client-side ntpd.cfg
[ntpd]
	#DISABLED
	ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
	CMD $XYMONCLIENTHOME/ext/ntpd.sh
	LOGFILE $XYMONCLIENTLOGS/xymonclient.log
	INTERVAL 5m

Server-side:
Add "ntpd=ncv" to TEST2RRD variable and "ntpd" to GRAPHS variable in xymonserver.cfg.
Add new line "NCV_ntpd="Offset:GAUGE,*:NONE" to xymonserver.cfg.
Create new file /etc/xymon/graphs.d/ntpd.cfg:

server-side ntpd.cfg
[ntpd]
     TITLE NTP accuracy
     YAXIS Sec
     DEF:o=ntpd.rrd:Offset:AVERAGE
     AREA:o#1818B4:Offset
     COMMENT:\n
     GPRINT:o:LAST:Offset \: %5.2lf (cur)
     GPRINT:o:MAX: \: %5.2lf (max)
     GPRINT:o:MIN: \: %5.2lf (min)
     GPRINT:o:AVERAGE: \: %5.2lf (avg)\n

Add "ntpd" tag to hosts.cfg for monitored targets.
Restart the xymon-server.

Download

Screenshots:

ntpd: green / yellow / red