Re: Questions about using mrtg
On Wed, 24 Nov 1999, John Foster wrote:
> Does anyone know if mrtg can be used as a traffice analyser for a web
> site that is hosted via an ADSL connection. I want to have info
> regarding the usage of my site and want more detail than is provided by
> webalizer. I am particularly interested in monitoring connection speeds.
It is fairly easy to get bandwidth and hit rate graphs out of mrtg, I use
these scripts:
# for traffic
#!/bin/sh
awk -F '[ \t\n\:]+' -- '/eth0/ {print $3;print $11;}' < /proc/net/dev
uptime
hostname -f
# For apache
#!/bin/sh
echo 0
wget -q -O - http://127.0.0.1/server-status?auto | awk -- '/Total Accesses:/ {print $3*100}'
uptime
hostname -f
And invoke them from mrtg like:
Target[master.eth0]: `/usr/local/bin/mrtg-ip-acct`
Jason
Reply to: