Can't get this check_hp plugin to work

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.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Can't get this check_hp plugin to work

Post by xpac »

I found this plugin: http://exchange.nagios.org/directory/Pl ... hp/details

Well, I'm just trying to run the command and I keep getting an error and I'm not sure where to go as I can't get it to work properly.

I want to test check_hp so I used one of the components and try to run it manually:
./check_hp -H myhostIPaddress -C cpqSeCpuStatus

And the error I get is:
Compaq/HP Agent Check:ERROR: No snmp response from 192.168.56.202 (alarm)

Not sure what this means, I install snmp and the HP snmp agents, snmpd is running, I didn't do any special configuration changes, so I'm not sure what's wrong. Its a shame, because this particular plugin has everything I'm looking for...
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

I should add that in addition to snmpd running, iptables is off and SELinux is set to permissive.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't get this check_hp plugin to work

Post by slansing »

Just to verify, what is the output of:

Code: Select all

nmap -sU -p 161 add.of.target.system

snmpwalk -v2c -c communitystring addr.of.target.system
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

Result of nmap command:
Starting Nmap 5.51 ( http://nmap.org ) at 2014-10-20 09:38 PDT
Nmap scan report for server name (server IP)
Host is up (0.00046s latency).
PORT STATE SERVICE
161/udp open snmp

Nmap done: 1 IP address (1 host up) scanned in 0.04 seconds


Result of snmpwalk:
Timeout: No Response from server IP


So I guess the output from snmpwalk is the problem
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

Actually scratch that, I forgot to put in the actual communitystring when I ran snmpwalk :lol:

The output from snmpwalk was QUITE large, is there a particular piece of it that would be helpful?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't get this check_hp plugin to work

Post by slansing »

Sorry, I was more having you try that to see if you could actually get a legitimate SNMP response from the that server, back to core. The "-C" you used is for the community string, lets restructure your check a bit:

Code: Select all

/path/to/your/plugin/check_hp -H addr.of.host.server -C yourcommunitystring -v 2 
I don't see any additional options besides that that you would need to use, there is a debug flag, as well as auth priv flags if you are using snmpv3.
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

Now I get this:
/usr/local/nagios/libexec/check_hp -H host ip address -C communitystring -v 2

Compaq/HP Agent Check: status of the NIC logical group (groupFailed)
status of the NIC logical group (groupFailed)
physical adapter status (linkFailure)
physical adapter status (linkFailure)

This is good, as it shows some progress :D (and two of the four NICs are down/not connected on purpose so I think that is accurate)
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

BTW when I try to run that command on the actual server using its IP address I get:

Compaq/HP Agent Check: no cpq/hp component found

When I run it using localhost instead of the actual IP I get the NIC status output. So this means I've got some configuring/fixing to do, I'm guessing in the snmpd.conf file
xpac
Posts: 54
Joined: Mon Aug 25, 2014 3:43 pm

Re: Can't get this check_hp plugin to work

Post by xpac »

Ok, the "no cpq/hp component found" issue has to do with the community string, also I added my local Nagios server IP address to the snmpd.conf so that it can now query the remote host.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Can't get this check_hp plugin to work

Post by slansing »

Awesome, did you get it sorted out then? :)
Locked