# rrds/ping - Reachability via ping.
# CVS $Id: ping,v 1.9 2003/05/15 12:11:16 remstats Exp $
# from remstats version @@VERSION@@
# Copyright 2003 by Thomas Erskine <@@AUTHOR@@>

source	ping
step	300

data	sent=ping-sent GAUGE:600:0:10
data	rcvd=ping-rcvd GAUGE:600:0:10
data	min=pingrtt-min GAUGE:600:U:U
data	avg=pingrtt-avg GAUGE:600:U:U
data	max=pingrtt-max GAUGE:600:U:U

alert	rcvd > 5 2 0
alert	avg < 500
archives day-avg week-avg month-avg 3month-avg year-avg day-max week-max month-max 3month-max year-max day-min week-min month-min 3month-min year-min
times	thumb day yesterday week 3month year

graph	ping desc="This is collected by the ping-collector.  The information comes from running <B>multiping</B>, which comes with remstats.  At each collection time, multiping sends 10 pings (ICMP echo-request packets) to the host and counts the number of responses."
		--upper-limit 10 --lower-limit 0 --rigid
		--vertical-label 'packets'
		--title '##HOST## - Ping Response (##GRAPHTIME##)'
		DEF:sent=##DB##:sent:AVERAGE
		DEF:avgrcvd=##DB##:rcvd:AVERAGE
		DEF:minrcvd=##DB##:rcvd:MIN
		CDEF:missing=sent,UN,INF,UNKN,IF
		'AREA:sent###COLOR2##:Pings Sent'
		'LINE2:minrcvd###COLOR3##:Pings Rcvd (min)'
		'LINE2:avgrcvd###COLOR1##:Pings Rcvd (avg)'
		'AREA:missing###MISSING##:missing'

graph	pingrtt desc='This is collected by the ping-collector.  The information comes from running <B>multiping</B>, which comes with remstats.  At each collection time, multiping sends 10 pings (ICMP echo-request packets) to the host and measures how long each response took.  The RTT (Return Trip Time) for the ping is how long it took to send a ping and receive the response for it.  The minimum, maximum and average times taken at each collection are shown.  The average and maximum numbers shown at the bottom of the graph are taken over the time period covered by the graph.'
		--title '##HOST## - Ping RTT (##GRAPHTIME##)' 
		--lower-limit 0
		--vertical-label 'ms'
		DEF:min=##DB##:min:MIN
		DEF:avg=##DB##:avg:AVERAGE
		DEF:max=##DB##:max:MAX
		CDEF:missing=min,UN,INF,UNKN,IF
		'AREA:max###COLOR3##:Max RTT'
		'AREA:avg###COLOR2##:Avg RTT'
		'AREA:min###COLOR1##:Min RTT'
		'GPRINT:max:MAX:max=%.0lf%s'
		'GPRINT:avg:AVERAGE:avg=%.0lf%s'
		'AREA:missing###MISSING##:missing'

graph	thumb desc="This is collected by the ping-collector.  It is used in the Ping Index and nowhere else.  If you see this description on a web-page, please let me know as it should never happen."
		--title '##SHORTHOST##'
		--lower-limit 0 --upper-limit 10 --rigid
		--height ##THUMBHEIGHT## --width ##THUMBWIDTH##
		'DEF:sent=##DB##:sent:AVERAGE'
		'DEF:rcvd=##DB##:rcvd:MIN'
		CDEF:missing=sent,UN,INF,UNKN,IF
		'AREA:sent###TOTALCOLOR##'
		'LINE2:rcvd###USEDCOLOR##'
		'AREA:missing###MISSING##:missing'

