Page 2 of 2
Re: help on check_snmp
Posted: Wed Mar 04, 2020 11:18 am
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
Re: help on check_snmp
Posted: Wed Mar 04, 2020 3:18 pm
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
Re: help on check_snmp
Posted: Thu Mar 05, 2020 2:33 pm
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
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?
Re: help on check_snmp
Posted: Thu Mar 05, 2020 2:36 pm
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
CRITICAL - Plugin timed out while executing system call
Re: help on check_snmp
Posted: Thu Mar 05, 2020 3:35 pm
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
Re: help on check_snmp
Posted: Fri Mar 06, 2020 2:34 pm
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
Re: help on check_snmp
Posted: Fri Mar 06, 2020 3:22 pm
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
Re: help on check_snmp
Posted: Sat Mar 07, 2020 5:49 am
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
Re: help on check_snmp
Posted: Sat Mar 07, 2020 2:15 pm
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.