Connection problems using SNMP and NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mdzx111
Posts: 39
Joined: Tue Apr 17, 2012 2:27 pm

Connection problems using SNMP and NagiosXI

Post 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.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Connection problems using SNMP and NagiosXI

Post 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  
mdzx111
Posts: 39
Joined: Tue Apr 17, 2012 2:27 pm

Re: Connection problems using SNMP and NagiosXI

Post 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]#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connection problems using SNMP and NagiosXI

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mdzx111
Posts: 39
Joined: Tue Apr 17, 2012 2:27 pm

Re: Connection problems using SNMP and NagiosXI

Post 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...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connection problems using SNMP and NagiosXI

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mdzx111
Posts: 39
Joined: Tue Apr 17, 2012 2:27 pm

Re: Connection problems using SNMP and NagiosXI

Post 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]#
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connection problems using SNMP and NagiosXI

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mdzx111
Posts: 39
Joined: Tue Apr 17, 2012 2:27 pm

Re: Connection problems using SNMP and NagiosXI

Post by mdzx111 »

How do I do that?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Connection problems using SNMP and NagiosXI

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked