monitoring ppp0 with mrtg

Alejandro Flores alejandrorflores at gmail.com
Sat Nov 19 12:37:11 UTC 2005


Hey,

> Hello,
> I am trying to monitor a standard dial-up connection as ppp0
> (non-static ip) with mrtg. I can generate a cfg file, but find ppp0 as
> disabled. Can some one please suggest a suitable configuartion syntax
> for ppp0.

I use a script like this:
/usr/local/sbin/mrtgstats-net.sh
#!/bin/sh

awk '
/'$1':/ {
$0=substr($0,index($0,":")+1);
print $1;print $9
}
' /proc/net/dev

And my mrtg.cfg looks like this:

--
Target[ppp0]: `/usr/local/sbin/mrtgstats-net.sh ppp0`
Title[ppp0]: Internet Traffic
MaxBytes[ppp0]: YOUR_SPEED_HERE_IN_BYTES/S
PageTop[ppp0]: <h1>Internet Traffic</h1>
Options[ppp0]: growright,bits,noinfo
--

This can be used to generate stats for others interfaces as well.

--
Regards,
Alejandro Flores
http://www.triforsec.com.br/




More information about the users mailing list