[Nagiosplug-help] check_snmp not passing community string to snmpget?
Lee Scott
Lee.Scott at ihealthtechnologies.com
Wed Aug 13 16:50:12 CEST 2008
Okay, a quick update. After reading up some more I found the -v option to
check_snmp. So it appears that check_snmp is in fact generating the
correct command to snmpget but still giving an error.
./check_snmp -v -C mycommunity -H xx.xx.xx.xx -o sysUpTime.0
/usr/local/net-snmp/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c mycommunity
xx.xx.xx.xx:161 sysUpTime.0
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
However executing the command provided by the verbose output I get valid
output.
$ /usr/local/net-snmp/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c mycommunity
xx.xx.xx.xx:161 sysUpTime.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (249203581) 28 days,
20:13:55.81
Lee Scott
<Lee.Scott at ihealt
htechnologies.com To
> nagiosplug-help at lists.sourceforge.n
Sent by: et
nagiosplug-help-b cc
ounces at lists.sour
ceforge.net Subject
[Nagiosplug-help] check_snmp not
passing community string to
08/13/2008 10:32 snmpget?
AM
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?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Help
mailing list