# rrds/qmail-poplog - info from logs of qmail-pop3d (actually tcpserver for qmail-pop3d)
#
source	log
step 	300
data	concurrency	GAUGE:600:0:U	max : status: (\d+)
data	sessions	GAUGE:600:0:U	count : pid
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 month 3month year

graph	concurrency desc="how many pop processes are fetching mail at the same time"
	--title "##HOST## - POP3 concurrency (##GRAPHTIME##)"
	--lower-limit 0
	--vertical-label 'sessions'
	DEF:concurrency=##DB##:concurrency:MAX
	'LINE2:concurrency###COLOR1##:sessions'
	'GPRINT:concurrency:MIN:min=%.0lf'
	'GPRINT:concurrency:AVERAGE:avg=%.0lf'
	'GPRINT:concurrency:MAX:max=%.0lf'
	'GPRINT:concurrency:LAST:cur=%.0lf'


graph	sessions desc="how many sessions over a 5-min sample"
	--title "##HOST## - POP3 sessions (##GRAPHTIME##)"
	--lower-limit 0
	--vertical-label 'sessions'
	DEF:sessions=##DB##:sessions:AVERAGE
	'LINE2:sessions###COLOR1##:sessions'
	'GPRINT:sessions:MIN:min=%.0lf'
	'GPRINT:sessions:AVERAGE:avg=%.0lf'
	'GPRINT:sessions:MAX:max=%.0lf'
	'GPRINT:sessions:LAST:cur=%.0lf'
