Page 1 of 2
Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 11:51 am
by mdzx111
Hello,
I am VERY new to Linux and NagiosXI. I am using a virtual install of NagiosXI. My test box is a virtual Linux CentOS 5.8 64 bit and GNOME 2.16.0.
I am trying to get NagiosXI to be able to monitor the test CentOS box using only SNMP.
I follow the instructions in the PDF located here:
http://library.nagios.com/library/produ ... using-snmp
When I try to do the test for SNMP connectivity from the NagiosXI machine to the CentOS box using Putty, I get the following error:
Requested table is empty or does not exist.
Please help and bear with me since I'm very new using the command line and Linux in general.
Thank you.
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 1:31 pm
by mguthrie
So just to verify, you're running:
Code: Select all
./check_snmp_storage.pl -H x.x.x.x -C public -m "^/$" -w 2 -c 4
Lets try a different approach. It appears to be connecting ok, so lets try this:
Code: Select all
./check_snmp_storage.pl -H x.x.x.x -C public --v2c -m "/boot" -w 2 -c
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 1:42 pm
by mdzx111
Below is what I get when I try both....
Just so we're both on the same page, this is from the NagiosXI box and 192.168.1.171 is the CentOS test box.
[root@localhost ~]# ./check_snmp_storage.pl -H 192.168.1.171 -C public -m "^/$" -w 2 -c 4
-bash: ./check_snmp_storage.pl: No such file or directory
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# cd /usr/local/nagios/libexec
[root@localhost libexec]# ./check_snmp_storage.pl -H 192.168.1.171 -C public -m "^/$" -w 2 -c 4
ERROR: Description/Type table : Requested table is empty or does not exist.
[root@localhost libexec]# ./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -m "/boot" -w 2 -c
Argument "" isn't numeric in numeric lt (<) at ./check_snmp_storage.pl line 275.
warn < crit if type=pu
Usage: check_snmp_storage [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>]) [-p <port>] -m <name in desc_oid> [-q storagetype] -w <warn_level> -c <crit_level> [-t <timeout>] [-T pl|pu|bl|bu ] [-r] [-s] [-i] [-e] [-S 0|1[,1,<car>]] [-o <octet_length>]
[root@localhost libexec]#
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 1:59 pm
by scottwilkerson
mdzx111 wrote:[root@localhost libexec]# ./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -m "/boot" -w 2 -c
You got the last error because you didn't have a value after -c
Run
Code: Select all
cd /usr/local/nagios/libexec
./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -m "/boot" -w 2 -c 4
If that works, try
Code: Select all
cd /usr/local/nagios/libexec
./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -r -m "/" -w 2 -c 4
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 2:16 pm
by mdzx111
Below is what happens when I try to run the first command again.
[root@localhost libexec]# ./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -m "/boot" -w 2 -c 4
Unknown storage : /boot : ERROR
[root@localhost libexec]# cd /usr/local/nagios/libexec
[root@localhost libexec]# ./check_snmp_storage.pl -H 192.168.1.171 -C public --v2c -m "/boot" -w 2 -c 4
Unknown storage : /boot : ERROR
[root@localhost libexec]#
Help please...
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 2:34 pm
by scottwilkerson
Can you run the following so we know what devices are even possible
Code: Select all
snmpwalk -v2c -c public 192.168.1.171 1.3.6.1.2.1.25.2.3.1.3
Thanks
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 2:40 pm
by mdzx111
[root@localhost libexec]# snmpwalk -v2c -c public 192.168.1.171 1.3.6.1.2.1.25.2.3.1.3
HOST-RESOURCES-MIB::hrStorageDescr = No more variables left in this MIB View (It is past the end of the MIB tree)
[root@localhost libexec]#
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 2:54 pm
by scottwilkerson
This means that your client machine isn't offering this data via it's snmp service
You might need to make sure the snmp configuration on the client isn't being too restrictive
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 2:59 pm
by mdzx111
How do I do that?
Re: Connection problems using SNMP and NagiosXI
Posted: Wed Apr 18, 2012 3:29 pm
by scottwilkerson
It would be in the configuration for snmp on 192.168.1.171
I can't really tell you how to set it up because it would depend on your setup and what kind of machine this is, etc.