[mrtg] Weird MRTG Problem.

Roddy Strachan roddy at netspace.net.au
Fri Nov 22 12:16:15 MET 2002


Hi,

I am hoping someone out there can help me, the scenario is as follows.

I am monitoring the CPU load of a Cisco content engine (using the specific
Cisco MIBS).

I can get the actual value of CPU load no problem doing a snmpget from the
command line ie:

snmpget x.x.x.x community .1.3.6.1.4.1.9.9.178.1.1.2.8.0

Gives the output of

enterprises.9.9.178.1.1.2.8.0 = Gauge32: 23

I then tidy it up a bit and change it to :

snmpget x.x.x.x community .1.3.6.1.4.1.9.9.178.1.1.2.8.0 | cut -d : -f 2
which makes it
 23

Now the weird bit starts, when I plug that actual command into my cfg file
and run it via cron it doesnt graph properly, the logfile looks like :

1037963641 -1 -1
1037963641 1 1 1 1
1037963581 1 1 1 1

And so on, therefor creating a graph of 1 all the way along
BUT

If i run the command manually ie :

/usr/local/mrtg-2/bin/mrtg /usr/local/mrtg-2/etc/x.x.x.x.cfg

And then check the logfile it puts the correct value in there ie :

1037963770 3 -1
1037963770 3 1 3 1

And graphs accordingly, for some reason when it is ran automatically from
cron it fails to get the right value.

I hope i've explained myself properly here.

Any help would be greatly appreciated as to why its not working the way it
should.

Thanks


--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list