# rrds/snmpif-* - Interface data obtained via SNMP

# N.B. snmpif-* is a *MAGIC* name.  I.E. snmp-collector has it hard-wired
# in and will collect the right things, as specified here.  You CANNOT add 
# extra things by specifying the oids here, though you can leave some out, 
# by leaving out the uninteresting data lines.  The oid lines are commented 
# out by design. Until I re-write snmp-collector a bit.
source		snmp
step		300
data		inbytes=if-*:inoctets COUNTER:600:0:U
data		outbytes=if-*:outoctets COUNTER:600:0:U
data		inerrors=if-*:inerrors COUNTER:600:0:U
data		outerrors=if-*:outerrors COUNTER:600:0:U
data		inucastpkts=if-*:inucastpkts COUNTER:600:0:U
data		outucastpkts=if-*:outucastpkts COUNTER:600:0:U
data		innucastpkts=if-*:innucastpkts COUNTER:600:0:U
data		outnucastpkts=if-*:outnucastpkts COUNTER:600:0:U
data		status=if-*:status GAUGE:600:0:1
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 3month year
#oid		ifInOctets
#oid		ifOutOctets
#oid		ifInErrors
#oid		ifOutErrors
#oid		ifInUcastPkts
#oid		ifOutUcastPkts
#oid		ifInNUcastPkts
#oid		ifOutNUcastPkts
#oid		ifType
#oid		ifSpeed
#oid		ifOperStatus

graph		bytes-*
		--title "##HOST## bits/s for ##WILDPART## (##GRAPHTIME##)"
		--lower-limit 0
		--vertical-label 'bits/s'
		DEF:inbytes=##DB##:inbytes:AVERAGE
		DEF:outbytes=##DB##:outbytes:AVERAGE
		CDEF:inbits=inbytes,8,*
		CDEF:outbits=outbytes,8,*
		HRULE:1540000###LINECOLOR##:T1
		'AREA:inbits###INCOLOR##:bps in'
		'LINE2:outbits###OUTCOLOR##:bps out'
		'GPRINT:inbits:AVERAGE:in avg=%.0lf%s'
		'GPRINT:inbits:MAX:max=%.0lf%s'
		'GPRINT:inbits:LAST:cur=%.0lf%s'
		'GPRINT:outbits:AVERAGE:out avg=%.0lf%s'
		'GPRINT:outbits:MAX:max=%.0lf%s'
		'GPRINT:outbits:LAST:cur=%.0lf%s'

#graph		errors-*
#		--title '##HOST## errors for ##WILDPART## (##GRAPHTIME##)'
#		--lower-limit 0
#		--vertical-label 'errors'
#		DEF:inerrors=##DB##:inerrors:AVERAGE
#		DEF:outerrors=##DB##:outerrors:AVERAGE
#		'LINE2:inerrors###COLOR1##:errors in'
#		'LINE2:outerrors###COLOR2##:errors out'

graph		packets-*
		--title '##HOST## packets/s for ##WILDPART## (##GRAPHTIME##)'
		--lower-limit 0
		--vertical-label 'packets/s'
		DEF:inucastpkts=##DB##:inucastpkts:AVERAGE
		DEF:outucastpkts=##DB##:outucastpkts:AVERAGE
		DEF:innucastpkts=##DB##:innucastpkts:AVERAGE
		DEF:outnucastpkts=##DB##:outnucastpkts:AVERAGE
		'AREA:inucastpkts###INCOLOR##:unicast in'
		'STACK:innucastpkts###INCOLOR2##:(broad/multi)cast in'
		'LINE2:outnucastpkts###OUTCOLOR##:(broad/multi)cast out'
		'STACK:outucastpkts###OUTCOLOR2##:unicast out' 

#graph		status-*
#		--title '##HOST## status for ##WILDPART## (##GRAPHTIME##)'
#		--lower-limit 0 --upper-limit 3 --rigid
#		--vertical-label 'status'
#		--units-exponent 0
#		DEF:status=##DB##:status:AVERAGE
#		'LINE2:status###COLOR1##:bytes in'
#		'COMMENT:(1=up, 2=down, 3=testing)'

