help on check_snmp

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
attilay2k
Posts: 11
Joined: Sat Feb 22, 2020 5:58 am

Re: help on check_snmp

Post by attilay2k »

hi @scottwilkerson

finally i found the relation in the mib structure by asking to the vendor.

Now there's another problem

pi@rpi4b:/usr/local/nagios/libexec $ ./check_snmp -H xxx.xxx.xxx.xxx -P 2c -C myPrivate -o apInfo -v
/usr/bin/snmpget -Le -t 3 -r 5 -m ALL -v 2c [context] [authpriv] xxx.xxx.xxx.xxx:161 apInfo
CRITICAL - Plugin timed out while executing system call

also adding parameter with highest timeout (for example -t 200) the result is always the same
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: help on check_snmp

Post by scottwilkerson »

Are you sure apInfo is an OID ? or is it a MIB you are trying to use as a base for the check?

Can you run the following and get results?

Code: Select all

snmpwalk -v 2c -c 'myPrivate' xxx.xxx.xxx.xxx apInfo
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
attilay2k
Posts: 11
Joined: Sat Feb 22, 2020 5:58 am

Re: help on check_snmp

Post by attilay2k »

hi @scottwilkerson, thanks for your kind and quick reply

you're right, snmpwalk to apInfo seems to be a wrong OID
apInfo: Unknown Object Identifier (Sub-id not found: (top) -> apInfo)
but then I just can't understand how it works, Alcatel says it doesn't provide support for Nagios and to ask you how to use their MIBs :evil:

they gave me a MIB but it is strange and not usable
so I tried to snmpwalk without specifying any OID
snmpwalk -v 2c -c CORRADO 192.168.1.101
the result, attached to this message, seems to use standard MIBs (SNMPv2-MIB, IF-MIB, TCP-MIB, etc), could you please help me understand how to get these infos in my Nagios Core?
Attachments
snmpwalk20200305.txt
snmpwalk -v 2c -c CORRADO 192.168.1.101
(320 KiB) Downloaded 122 times
attilay2k
Posts: 11
Joined: Sat Feb 22, 2020 5:58 am

Re: help on check_snmp

Post by attilay2k »

p.s.: sorry, the message was sent before the end :)

if i try to run
./check_snmp -H 192.168.1.101 -c CORRADO -o sysUpTimeInstance
i got the same error :evil: :evil: :twisted:
CRITICAL - Plugin timed out while executing system call
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: help on check_snmp

Post by scottwilkerson »

the community string for that plugin is a -C not -c

Try

Code: Select all

./check_snmp -H 192.168.1.101 -P 2c -C CORRADO -o sysUpTimeInstance
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
attilay2k
Posts: 11
Joined: Sat Feb 22, 2020 5:58 am

Re: help on check_snmp

Post by attilay2k »

you're right again, but the result is the same, also adding the -t parameter

pi@rpi4b:/usr/local/nagios/libexec $ ./check_snmp -H 192.168.1.101 -P 2c -c CORRADO -o sysUpTimeInstance -t 60
CRITICAL - Plugin timed out while executing system call
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: help on check_snmp

Post by scottwilkerson »

you still didn't change to a capital C

instead of this

Code: Select all

./check_snmp -H 192.168.1.101 -P 2c -c CORRADO -o sysUpTimeInstance -t 60
run this

Code: Select all

./check_snmp -H 192.168.1.101 -P 2c -C CORRADO -o sysUpTimeInstance -t 60
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
attilay2k
Posts: 11
Joined: Sat Feb 22, 2020 5:58 am

Re: help on check_snmp

Post by attilay2k »

'ur right again, sorry :)
pi@rpi4b:/usr/local/nagios/libexec $ ./check_snmp -H 192.168.1.101 -P 2c -C CORRADO -o sysUpTimeInstance -t 60
SNMP OK - Timeticks: (121088893) 14 days, 0:21:28.93 | DISMAN-EVENT-MIB::sysUpTimeInstance=121088893


Then now the question is, based on snmpwalk20200305.txt previously attached, how do i monitor my APs?

how could i know each device how much consumes?
i see that there are these informations but hope that i do not have to create a single monitor service for each one of these 246 devices
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: help on check_snmp

Post by scottwilkerson »

attilay2k wrote:Then now the question is, based on snmpwalk20200305.txt previously attached, how do i monitor my APs?

how could i know each device how much consumes?
i see that there are these informations but hope that i do not have to create a single monitor service for each one of these 246 devices
this is a decision you have to make yourself, you can basically monitor any of the 4838 oids displayed in the snmpwalk

Which of them are important to you is a decision you need to make.
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked