[mrtg] Error msg re Failure to resolve host name in snmp
Tyson at AI.SRI.COM
Fri Jan 21 21:18:58 CET 2011
Maybe I'm missing something obvious. Any help would be appreciated.
I recently upgraded to version 2.17.0 from 2.14.7. Since then, cfgmaker
is reporting an error when I try to build the configuration for our router.
> # /usr/local/mrtg-2/bin/cfgmaker --global "Workdir: $DIR/workdir/mrtg"
> --global 'Options[_]: bits,growright' --snmp-options :::::2
> --ifdesc=alias --host-template=$DIR/mrtg/cpu.config --output
> $DIR/mrtg/cfg/myrouter.cfg mycommunity at myrouter.example.com
> can't resolve "myrouter.example.com" to IP address
> at /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_util.pm line 428
> SNMPWALK Problem for mycommunity at myrouter.example.com:::::2:v4only
> at /usr/local/mrtg-2/bin/cfgmaker line 958
> WARNING: Skipping mycommunity at myrouter.example.com:::::2 as no info
> could be retrieved
It works properly if I use any of several (I didn't try all 22) of the
router's IP addresses ("mycommunity at myrouter.example.com" ->
"mycommunity at 18.104.22.168"). It works properly if I use the name of one of
my switches ("mycommunity at myswitch.example.com"). nslookup (or dig)
properly find the IP addresses for the router name. (nsswitch.conf
indicates hosts should first be looked up in files and then dns.)
I don't want to switch to using an IP address as the IP address (vs
hostname) gets used throughout, making things less intelligible.
The OS is Ubuntu Hardy Heron (8.0.4 LTS).
More information about the mrtg