# rrds/port-* - Generic service on a fixed tcp port.  
# Status is (1=OK, 2=WARN, 3=ERROR, 4=CRITICAL)
# Response is number of milliseconds it took to query the service.
source		port
step		300
data		status=port-* GAUGE:1200:0:U
data		response=port-*-response GAUGE:1200:0:U
alert		status < 2 3 4
alert		response >daystddev 1 2 3
archives	day-avg week-avg month-avg 3month-avg year-avg
times		day yesterday week 3month year

#graph		port-*
#		--title '##HOST## - ##RRD## Status (##GRAPHTIME##)'
#		--lower-limit 0 --upper-limit 4 --rigid
#		--vertical-label 'status'
#		--units-exponent 0
#		DEF:status=##DB##:status:AVERAGE
#		'LINE2:status###COLOR1##:status'
#		'COMMENT:(1=ok, 2=warning, 3=err, 4=critical)'

graph		response-* desc="how long the port took to respond to the query"
		--title '##HOST## - ##RRD## Response (##GRAPHTIME##)'
		--lower-limit 0 
		--vertical-label 'ms'
		DEF:response=##DB##:response:AVERAGE
		'LINE2:response###COLOR1##:response'
		'GPRINT:response:MIN:(min,avg,max) = (%.0lf,'
		'GPRINT:response:AVERAGE:%.0lf,'
		'GPRINT:response:MAX:%.0lf)'

