Page 1 of 1

help with check snmp

Posted: Wed Jun 06, 2018 2:53 pm
by benhank
I am trying to use check_snmp to poll an apcups device.
I have loaded the powernet mib onto my server.
I can use the ireasoning mib browser to communicate with the sdevice an pull its oids.

but when I try to use check_snmp

Code: Select all

$USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o $ARG2$
Capture.PNG
When I use the run check command to test, I get:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 172.22.193.70 -C public -o .1.3.6.1.4.1.318.1.1.12.1.1
SNMP problem - No data received from host
CMD: /usr/bin/snmpget -t 1 -r 5 -m '' -v 1 [authpriv] 172.22.193.70:161  .1.3.6.1.4.1.318.1.1.12.1.1
what do I need to do tho get this to work?
Thanks in advance!

Re: help with check snmp

Posted: Wed Jun 06, 2018 3:29 pm
by scottwilkerson
The fact that you are getting

Code: Select all

No data received from host
Tells me either the host isn't listening for SNMP request, OR public isn't a valid community string on the APC, OR you need to be specific on the version of SNMP your unit is listening on

Code: Select all

 -P, --protocol=[1|2c|3]
    SNMP protocol version
, Or lastly, it doesn't have that OID

Re: help with check snmp

Posted: Wed Jun 06, 2018 3:52 pm
by benhank
ok thanks ill check what you suggested and let you know how it goes! wooOO000!

Re: help with check snmp

Posted: Wed Jun 06, 2018 3:55 pm
by benhank
so uh (apologies its been awhile) how would that command look when I add the -p parameter?

Re: help with check snmp

Posted: Wed Jun 06, 2018 4:32 pm
by scottwilkerson

Code: Select all

/usr/local/nagios/libexec/check_snmp -H 172.22.193.70 -C public -P 2c -o .1.3.6.1.4.1.318.1.1.12.1.1
This would be for 2c. Note: it is a capital P

Re: help with check snmp

Posted: Thu Jun 07, 2018 9:26 am
by benhank
thanks man. like I said its been a while.
wait a minute! Hey Scot! didnt see it was you!

Re: help with check snmp

Posted: Thu Jun 07, 2018 9:32 am
by scottwilkerson
benhank wrote:thanks man. like I said its been a while.
wait a minute! Hey Scot! didnt see it was you!
Good to see you still around! I'm making a forum comeback :lol:

Can we lock this up Ben?

Re: help with check snmp

Posted: Thu Jun 07, 2018 10:01 am
by benhank
yes sir you can

Re: help with check snmp

Posted: Thu Jun 07, 2018 10:04 am
by scottwilkerson
Sounds good... Locking