Monitoring HP Windows Servers with Nagios

I want to love Nagios, I really do. The learning curve has been a bit steep but I think it’s finally paying off.

One problem that I continued to have no luck with was monitoring HP servers. Obviously I was interested in monitoring things like temperature, RAID status, failures, etc.

For reference, I am currently running the following on my Nagios server:

CentOS 6.4
Nagios Core 3.5.1
Adagios 1.40

I’m assuming that you’ve added hosts, understand how to install NSClient++, and have a basic understanding of what’s under the hood with Nagios, including installing plugins.

The test server I am trying to pull SNMP data from is a DL380 G7 running Server 2008 R2. I have all HP System Management tools installed and am using the check_hpasm plugin.

Adding hosts with Adagios is really easy thanks to OKConfig. After adding the host I went ahead and installed NSClient++ and restarted Nagios. I checked the host in the Status pane and I can confirm that the basic Windows checks are working.

Basic checks working...one in the red

But the one that’s not is super important to me, which is the HP plugin. Drilling down to the alert for the specific service on this host, I see this:

SNMP error, wrong device???

SNMP error, wrong device???

CRITICAL – could not contact snmp agent, wrong device is the error I see.

Just for fun (and because rechecks from the web GUI are sometimes slow) I ran the command from the CLI:

/usr/lib64/nagios/plugins/check_hpasm -H 192.168.1.4 -C public --perfdata=long -v

This gave me the same error, but at least it’s consistent.

Googling that didn’t give me too much. Lots of recommendations of what needed to be running on the client side, but most of these posts were referencing *nix running on HP, not Windows. Other recommendations were to install/update the Perl SNMP modules from CPAN, but that all looked good.

Instead, I started digging into how SNMP was running on the Windows side. First of all, I confirmed that the HP Management Agent was running, as well as the SNMP service in Windows.

Next, I poked around the System Management Homepage. I browsed to Settings » SNMP Webagent » SNMP & Agent Settings. Under Security I found what I was looking for.

HP's SNMP settings

HP’s SNMP settings

So two options, accept from ANY host or from a defined host list. By default only localhost is allowed; by separating each host with a semicolon, then applying and restarting agents, polling began to work as expected.

Wordpress4

It works!

All green in the status pane

And that’s it. One quick check in the Status Pane to confirm it’s looking pretty and I’m done.

I expect to continue playing with Nagios and working towards a write-up that will describe some of the nuances I hit.

Cheers.

Leave a Reply