[mrtg] MRTG and reading real network speeds on openBSD 4.9, a litle hack here

Ton Muller spatieman at online.nl
Sun Sep 18 12:57:04 CEST 2011


Ok, it is just a test i made,(took me some hours, but ok)
below config i made for router2.cgi in multi cfg config pulls every 2
minutes the packet stats from pfctl and dumps it after processing in a
nice mrtg graph.
the only thing it not yet does, is mesuring the out data (only in)
but the beginning is here.
now i am gonna try hack in several tools for getting IP packet stat from
lan machines..

Target[SK0_conf]: ` pfctl -vsr | tail -r -n 2 | awk ' {print $5 }  ' |
tail -1 `
SetEnv[SK0_conf]: MRTG_INT_IP="192.168.0.240" MRTG_INT_DESCR="SK0 LAN
Ethernet"
MaxBytes[SK0_conf]: 11000000
Title[SK0_conf]: Traffic Analysis for Ethernet port SK0 BSD box
kMG[SK0_conf]: Ki,Mi,Gi,Ti
Options[SK0_conf]: growright,nopercent
YLegend[SK0_conf]: Speed in Kbs
LegendI[SK0_conf]: speed: IN

PageTop[SK0_conf]: <H1>Traffic Analysis for Ethernet port SK0 BSD box</h1>
		<div id="sysdetails">
			<table>
				<tr><td>System:</td><td> in </td></tr>
##				<tr><td>Maintainer:</td><td>info at draytek.com.tw</td></tr>
				<tr><td>Description:</td><td>Ethernet0 </td></tr>
				<tr><td>ifType:</td><td>ethernet port SK0 1GB</td></tr>
				<tr><td>ifName:</td><td></td></tr>
				<tr><td>Max Speed:</td>	<td>1 GBytes/s</td></tr>
			</table>
		</div>
Directory[SK0_conf]: TEST



More information about the mrtg mailing list