[Nagiosplug-help] check_snmp not passing community string to snmpget?
Lee Scott
Lee.Scott at ihealthtechnologies.com
Wed Aug 13 16:32:25 CEST 2008
Okay, i'm trying to get snmp monitoring via nagios working. Nagios 3.0.3.
Plugins 1.4.12. Net-SNMP 5.4.1.2.
I've installed the net-snmp packages and compiled the plugins accordingly.
I can run the snmpwalk agaist the host and get data back. I can run the
snmpget command manually get get data back.
The issue is that it appears to me that the nagios "check_snmp" pluggin is
not passing the community string the snmpget command and indicated by the
output below. It also appears that the "[authpriv]" should not be included
in the call to snmpget as that produces an error.
./check_snmp -H xx.xx.xx.xx -o sysUpTime.0 -C mycommunity
SNMP problem - No data received from host
CMD: /usr/local/net-snmp/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv]
xx.xx.xx.xx:161 sysUpTime.0
The CMD above should be:
CMD: /usr/local/net-snmp/bin/snmpget -c mycommunity -t 1 -r 5 -m ALL -v 1
[authpriv] xx.xx.xx.xx:161 sysUpTime.0
but that gets you an error as well.
getaddrinfo: [authpriv] node name or service name not known
snmpget: Unknown host ([authpriv])
So, ultimatly the command should be:
/usr/local/net-snmp/bin/snmpget -c iht -t 1 -r 5 -m ALL -v 1
xx.xx.xx.xx:161 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (249091149) 28 days,
19:55:11.49
So unless I'm calling check_snmp incorrectly or check_snmp is doing
something wrong to the command string this will never work.
Has anyone else seen this? Am I missing something?
More information about the Help
mailing list