# rrds/squid - monitor squid proxy web-cache
#
# N.B.: you must add a 'community whatever' to either this rrd, or to the
# host definitions that use it.  If you're monitoring other SNMP stuff on
# those hosts, then you *must* have the 'community whatever' line here.

source	snmp
port	3401
community public
step	30
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
data	vmsize=cacheSysVMsize GAUGE:1200:0:U
data	memusage=cachememusage GAUGE:1200:0:U
data	cpuusage=cachecpuusage COUNTER:1200:0:100
data	disksize=cachesysstorage GAUGE:1200:0:U
data	objects=cachenumobjcount GAUGE:1200:0:U
data	requests=cacheclienthttprequests COUNTER:1200:0:U
data	hits=cachehttphits COUNTER:1200:0:U
data	inkb=cachehttpinkb COUNTER:1200:0:U
data	outkb=cachehttpoutkb COUNTER:1200:0:U
data	clients=cacheclients COUNTER:1200:0:U
oid	cacheSysVMsize
oid	cacheSysStorage
oid	cacheMemUsage
oid	cacheCpuUsage
oid	cacheNumObjCount
oid	cacheClientHttpRequests
oid	cacheHttpHits
oid	cacheHttpInKb
oid	cacheHttpOutKb
oid	cacheClients

graph	squidsize
	--title '##HOST## - Squid Size (##GRAPHTIME##)'
	--vertical-label 'bytes'
	DEF:vmsize=##DB##:vmsize:AVERAGE
	DEF:disksize=##DB##:disksize:AVERAGE
	'LINE2:vmsize###COLOR1##:virtual memory'
	'LINE2:disksize###COLOR3##:disk usage'

graph	squidobjects
	--title '##HOST## - Squid Objects (##GRAPHTIME##)'
	DEF:objects=##DB##:objects:AVERAGE
	'LINE2:objects###COLOR1##:# objects'
	'GPRINT:objects:MIN:(min,avg,max)=%.1lf%s'
	'GPRINT:objects:AVERAGE:%.1lf%s'
	'GPRINT:objects:MAX:%.1lf%s'

graph	squidcpu
	--title '##HOST## - Squid CPU usage (##GRAPHTIME##)'
	--vertical-label '%'
	DEF:cpuusage=##DB##:cpuusage:AVERAGE
	CDEF:cpupercent=cpuusage,100,*
	'LINE2:cpupercent###COLOR1##:CPU usage'
	'GPRINT:cpupercent:MIN:(min,avg,max)=%.1lf%s'
	'GPRINT:cpupercent:AVERAGE:%.1lf%s'
	'GPRINT:cpupercent:MAX:%.1lf%s'

graph	squidclients
	--title '##HOST## - Squid Clients (##GRAPHTIME##)'
	--vertical-label 'clients'
	DEF:clients=##DB##:clients:AVERAGE
	'LINE2:clients###COLOR1##:clients'
	'GPRINT:clients:MIN:(min,avg,max)=%.1lf%s'
	'GPRINT:clients:AVERAGE:%.1lf%s'
	'GPRINT:clients:MAX:%.1lf%s'

graph	squidhits
	--title '##HOST## - Squid Requests and Hits (##GRAPHTIME##)'
	--vertical-label 'hits-per-sec'
	DEF:requests=##DB##:requests:AVERAGE
	DEF:hits=##DB##:hits:AVERAGE
	'LINE2:requests###COLOR1##:requests'
	'LINE2:hits###COLOR2##:hits'

graph	squidtraffic
	--title '##HOST## - Squid Traffic (##GRAPHTIME##)'
	--vertical-label 'bps or Bps'
	DEF:inkb=##DB##:inkb:AVERAGE
	DEF:outkb=##DB##:outkb:AVERAGE
	CDEF:in=inkb,1024,*
	CDEF:out=outkb,1024,*
	'LINE2:in###COLOR1##:in'
	'LINE2:out###COLOR2##:out'

