[mrtg] Error msg re Failure to resolve host name in snmp

Lyle Giese lyle at lcrcomputer.net
Fri Jan 21 21:33:21 CET 2011


Mabry Tyson wrote:
> 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
>> Error:
>>   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 1.2.3.4").  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).
>
>
>   
My first thought is that since you have hand edited what you posted(as
opposed to a pure cut & paste), there is a subtle typo in the real
command line you feed to cfgmaker and why I create bash scripts to run
cfgmaker.

Or myrouter.example.com is not resolving properly on your computer.

Lyle

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20110121/595213e8/attachment.htm 


More information about the mrtg mailing list