# rrds/unixtime - clock time differences
#
source	unix-status
step	300
data	time COUNTER:600:0:U	time
data	diff=timediff GAUGE:600:U:U	time
alert	diff |< 2
alert	time delta> 300
archives day-avg week-avg month-avg 3month-avg year-avg day-min week-min month-min 3month-min year-min day-max week-max month-max 3month-max year-max
times	day yesterday week month 3month year

graph	time desc="a timestamp ought to be monotonic increasing, this should detect time-warps"
	--title '##HOST## - Time Warp Detection (##GRAPHTIME##)'
	--vertical-label 'sec'
	DEF:time=##DB##:time:AVERAGE
	'LINE2:time###COLOR1##:time'

graph	timediff desc="The difference in time between the remote host and the remstats collector"
	--title '##HOST## - Time Difference (##GRAPHTIME##)'
	--lower-limit 0
	--vertical-label 'sec'
	DEF:diff=##DB##:diff:AVERAGE
	'LINE2:diff###COLOR1##:difference'
	'GPRINT:diff:AVERAGE:avg=%.1lf%s'

