[mrtg] Re: MRTG Return Code
Dean, Mike
mdean at landstar.com
Fri Jun 10 16:05:38 MEST 2005
Tobi,
These are the cases when it returns an error code of 0, even though
there was a problem gathering the data:
1) Device is up, reachable and responds to SNMP, but one of the targets
is invalid (I had purposely changed the IP address of the target to an
IP that didn't exist on the device):
/usr/local/mrtg/bin/mrtg /usr/local/etc/mrtg-cfg/run/ras/jaxvpnrt1.cfg
WARNING: Could not match host:'SNMPPASSWD at jaxvpnrt1:' ref:'Ip'
key:'1.1.1.1'
ERROR: Target[jaxvpnrt1_1.1.1.1][_IN_] ' $target->[0]{$mode} ' did not
eval into defined data
ERROR: Target[jaxvpnrt1_1.1.1.1][_OUT_] ' $target->[0]{$mode} ' did not
eval into defined data
[noc at fljaxnoc01 noc]$ echo $?
0
2) Device is not reachable for some reason (device is down, etc). SNMP
times out and produces the following. However, the result code is still
0 (I've removed some of the output for brevity):
[noc at fljaxnoc01 noc]$ /usr/local/mrtg/bin/mrtg
/usr/local/etc/mrtg-cfg/run/ras/jaxvpnrt1.cfg
SNMP Error:
no response received
SNMPv1_Session (remote host: "jaxvpnrt1" [1.1.1.99].161)
community: "SNMPPASSWD"
request ID: 1780381995
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/local/mrtg-2.10.13/bin/../lib/mrtg2/SNMP_util.pm line 487
SNMPGET Problem for ipAdEntIfIndex.1.1.1.99 ifInOctets.1
ipAdEntIfIndex.1.1.1.99 ifOutOctets.1 on
SNMPPASSWD at jaxvpnrt1::::::v4only
at /usr/local/mrtg/bin/mrtg line 1835
.
.
.
ERROR: Target[jaxvpnrt1_1.1.1.99][_IN_] ' $target->[0]{$mode} ' did not
eval into defined data
ERROR: Target[jaxvpnrt1_1.1.1.99][_OUT_] ' $target->[0]{$mode} ' did not
eval into defined data
[noc at fljaxnoc01 noc]$ echo $?
0
-----Original Message-----
From: Tobias Oetiker [mailto:oetiker at ee.ethz.ch]
Sent: Friday, June 10, 2005 9:04 AM
To: Dean, Mike
Cc: mrtg at list.ee.ethz.ch
Subject: Re: [mrtg] MRTG Return Code
Hi Mike,
when mrtg is not happy with your config file it will die and the
return code will be != 0
if it is otherwhise it is a bug, and I would be interested in
knowing under which circumstances it occures ...
cheers
tobi
--
______ __ _
/_ __/_ / / (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
/ // _ \/ _ \/ / System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/ http://people.ee.ethz.ch/oetiker +41(0)44-632-5286
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://lists.ee.ethz.ch/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the mrtg
mailing list