# rrds/httpdlog - This looks at a standard web-server log-file, rather sloppily.
source	log
step	300
data	requests	GAUGE:600:0:U	count (GET|POST)
data	success		GAUGE:600:0:U	count \sHTTP/\d\.\d"\s+2\d\d
data	bytes		GAUGE:600:0:U	sum \sHTTP/\d\.\d"\s+2\d\d\s+(\d+)
archives day-avg week-avg month-avg 3month-avg year-avg
times	day yesterday week 3month year

graph	httpreq
	--title '##HOST## - HTTP Requests (##GRAPHTIME##)'
	--lower-limit 0
	--vertical-label req
	DEF:requests=##DB##:requests:AVERAGE
	DEF:success=##DB##:success:AVERAGE
	'LINE1:requests###COLOR1##:requests'
	'LINE1:success###COLOR2##:successful requests'
	'GPRINT:requests:MAX:max=%.0lf%s'

graph	httpbytes
	--title '##HOST## - HTTP Bytes Transferred (##GRAPHTIME##)'
	--lower-limit 0
	--vertical-label bytes
	DEF:bytes=##DB##:bytes:AVERAGE
	'LINE2:bytes###COLOR1##:bytes transferres'
	'GPRINT:bytes:MAX:max=%.0lf%s'

