[rrd-users] iptables/per-Mac bandwidth monitoring with RRD

Orionshock orionshock at gmail.com
Sat Dec 15 22:58:54 CET 2012


I'm attempting to get a working Per-Mac address bandwidth monitoring system
working.I am able to reliably get the byte count per-mac address from
iptable calls and it does create graphs. The whole setup works.
However when viewing graphs generated from this data seems erratic or
inconsistent with the built in monitoring system on the router.

My rrd database setup : 
rrdtool create "$deviceMAC".rrd 
	--step 60 \
	'DS:upload:ABSOLUTE:120:0:U' \
	'DS:download:ABSOLUTE:120:0:U' \
	'RRA:LAST:0.5:1:89280'

Im getting the image with the following call :
		/opt/bin/rrdtool graph - \
			 --start="$startTime" \
			 --end="$endTime" \
			 --title="$TITLE" \
			 --vertical-label=Usage \
			 --imgformat=SVG \
			 --width="$4" \
			 --height="$5" \
			 --alt-y-mrtg \
			 --interlaced \
			 --base=1024 \
			 --font "DEFAULT:14:" \
			'DEF:Upload='$filename':upload:LAST' \
			'DEF:Download='$filename':download:LAST' \
			'CDEF:nD=Download,-1,*' \
			'VDEF:up=Upload,TOTAL' \
			'VDEF:down=Download,TOTAL' \
			'AREA:Upload#00CC00:Uploaded' \
			'GPRINT:up:%5.1lf %s \n' \
			'AREA:nD#0033FF:Downloaded' \
			'GPRINT:down:%3.1lf %s'

What I'm trying to do is get a history of total traffic for a given device
on the network for a rolling 2 month period. I'm not entirely interested in
per-second averages but only the total transferred.

My Main question is if im recording the data wrong or if it's being
displayed wrong.
I don't know if the  bits/bytes|SI/Metric
<http://www.speedguide.net/articles/bits-bytes-and-bandwidth-reference-guide-115>  
conversion is being done correctly.
 Another fun part is im doing all this in Bash3 and i don't know if that is
also affecting it.

Any help would be greatly appreciated.
--Orionshock



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/iptables-per-Mac-bandwidth-monitoring-with-RRD-tp7580691.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list