[mrtg] cfgmaker problem-- errors from a non-responsive host in config for responsive host

Steve Bonds 388rzvl02 at sneakemail.com
Fri Feb 11 02:41:06 MET 2005

MRTG Folks:

I'm having a problem with cfgmaker 2.11.1 that causes valid interfaces
on one host to not get set up properly when another host on the
command line isn't responding.  (e.g. dead SNMP agent.)  While it's
not hard to work around (don't include the host that isn't responding
on the command line), I'd like to keep the list of servers consistent
so when I fix the SNMP agent on all of them I can just re-run the same
command as featured in the output file.  ;-)

My searches of the mailing lists and newsgroups have not turned up
anything.  If there is a relevant post I missed, by all means help me
STFW by providing URLs or keywords.

I've reduced the situation to two simple scenarios.  "livehost" is a
UNIX system that has multiple IP interfaces.  "deadhost" is a host
that doesn't respond to SNMP, even though its name resolves in DNS.

Scenario One -- works:

cfgmaker --community=mycommunity --output=/tmp/livehost_deadhost.cfg
deadhost livehost

Scenario Two -- fails:

cfgmaker --community=mycommunity --output=/tmp/livehost_deadhost.cfg
livehost deadhost

If the dead host is the first one scanned, everything is fine.  If the
dead host is the second one scanned, then for the first interface on
the live host, the config says this:

----- (some details changed for privacy reasons)
### Interface 1 >> Descr: 'descr' | Name: '' | Ip: '' | Eth:
'00-11-11-11-11-11' ###
### The following interface is commented out because:
### * got 'no response received
###     SNMPv1_Session (remote host: "deadhost" [].161)
###                       community: "mycommunity"
###                      request ID: -186912558
###                     PDU bufsize: 8000 bytes
###                         timeout: 2s
###                         retries: 5
###                         backoff: 1)' from interface when trying to query
# Target[livehost_1]: 1:mycommunity at livehost:
# SetEnv[livehost_1]: MRTG_INT_IP="" MRTG_INT_DESCR="descr"
# MaxBytes[livehost_1]: 12500000
# Title[livehost_1]: Traffic Analysis for 1 -- livehost.domain.com
# PageTop[livehost_1]: <H1>Traffic Analysis for 1 -- livehost.domain.com</H1>
#  <TABLE>
#    <TR><TD>System:</TD>     <TD>livehost.domain.com in </TD></TR>
#    <TR><TD>Maintainer:</TD> <TD></TD></TR>
#    <TR><TD>Description:</TD><TD>descr  </TD></TR>
#    <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
#    <TR><TD>ifName:</TD>     <TD></TD></TR>
#    <TR><TD>Max Speed:</TD>  <TD>12.5 MBytes/s</TD></TR>
#    <TR><TD>Ip:</TD>         <TD> (livehost.domain.com)</TD></TR>
#  </TABLE>
----- (the second interface config looks fine)

I've taken a tour through the cfgmaker code, and I suspect the problem
is related to the fact that in the "foreach my $router" portion of the
main loop, when it can't get SNMP information it runs:

            warn "WARNING: Skipping $router as no info could be retrieved\n\n";
            sleep 5;

Leaving $router in the hash of %routers and moving on to the next,
though in my case the dead host is the last one so it proceeds to

Unfortunately, I've not been able to find the "smoking gun" bug that
causes the problem.

Has anyone else seen something similar?  Was there a good solution?


  -- Steve Bonds

PS: For those that saw my patch on mrtg-developers, the above bug was
replicated in an unmodified copy of cfgmaker.

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