mrtg suddenly broken
Net Llama!
netllama
Tue Oct 17 19:25:58 PDT 2006
On Tue, 17 Oct 2006, David Bandel wrote:
> On 10/16/06, Net Llama! <netllama at linux-sxs.org> wrote:
>> I've got mrtg setup on one system at home just to monitor the amount of
>> traffic going over eth0 (the only NIC/interface on the system). I set
>> this up over a year ago, and its been working fine ever since. Until
>> today, when I happened to take a look at the graphs and noticed that
>> they've basically flatlined.
>>
>> For example, I've had 25KB/s or more coming down eth0 for the past hour,
>> yet the graph for the past 24hours is a huge flat line at 0KB/s except for
>> a strange spike up to 4.8KB/s yesterday afternoon.
>>
>> The cronjob (which runs every 5 minutes) is:
>> */5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
>>
>> Running it manually returns no errors, but the graphs are still not
>> accurate.
>>
>> /etc/mrtg/mrtf.cfg looks like this:
>> ##############################
>> WorkDir: /var/www/mrtg
>> ThreshDir: /var/www/mrtg
>>
>> Target[r1]: 1:public at hal:
>> SetEnv[r1]: MRTG_INT_IP="10.0.0.1" MRTG_INT_DESCR="eth0"
>> MaxBytes[r1]: 1250000
>> Title[r1]: Traffic Analysis for eth0
>> PageTop[r1]: <H1>Stats for eth0</H1>
>> ##############################
>>
>> eth0 is 10.0.0.1 on my box.
>>
>> I've changed nothing in the mrtg configuration, so I'm completely stumped
>> on why its failing to record much of anything. Anyone have any
>> suggestions how or where to start troubleshooting this?
>
> 1. make sure snmpd is still running on the target system
>
> 2. look in your /etc/mrtg.cfg file and note which number the interface
> has. Then do:
> snmpwalk -c public -v 2c <ip_of_target> ifDesc
>
> This will give you the descriptions of the various interfaces on your syste.
# snmpwalk -c public -v 2c 10.0.0.1 ifDesc
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: dev1804289383
IF-MIB::ifDescr.3 = STRING: eth0
So based on that, should I be changing the 1 in this line from mrtg.cfg:
Target[r1]: 1:public at hal:
to a 3, like this?
Target[r1]: 3:public at hal:
I just tried that, and ran the cronjob manually, and its fixed!
Thanks for your help.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Lonni J Friedman netllama at linux-sxs.org
LlamaLand http://netllama.linux-sxs.org
More information about the Linux-users
mailing list