jump to navigation

Using Hyperic to monitor vSphere August 12, 2010

Posted by vneil in monitoring, VMware.
trackback

I’ve looked at Hyperic before as our application team were already using it to monitor their JBoss applications running on Linux and they already have it configured to push alerts to our main enterprise monitoring software. I thought I could use it also to push alerts from vCenter but earlier version of Hyperic didn’t support vSphere so well or only supported  host servers and not vCenter. On seeing news on the Hyperic site of a new release of Hyperic with improved vSphere support I decided to give it a test.

I signed up and downloaded the demo installer of Hyperic 4.4  which included the server and agent for Linux. I installed the in a standard SLES server and started the server. This was all quite straight forward and it also installed a copy of PostgreSQL to use as it’s database. When started the server it was accessible from a browser on port 7080. I signed in with the default user of hqadmin.

Initial screen after install

Initial screen after install

Starting dashboard

Starting dashboard

As with most monitoring software it needs agents. I installed an agent on the Windows server running VMware vSphere Server by downloading the win32 agent from the website and unpacking it on the W2003 server

Then it’s just a case of running hq-agent.bat install and  hq-agent.bat start

Install and start of Windows HQ agent

Install and start of Windows HQ agent

Answer the questions, I took the defaults. When it starts it goes off and registers itself with the HQ server using the details given.

The agent should discover application details from the  system it is on and appear after a refresh in the Auto-Discovery pane on the Dashboard of the HQ server. It should show VMware vCenter,  select Add to Inventory.

HQ agent auto-discovery

HQ agent auto-discovery

Unfortunately there seems to be a problem with the Windows HQ agent and vSphere as mentioned here

You need to edit the agent.properties file in the conf directory of the HQ agent with the details you gave when it was installed. Then restart the agent with hq-agent restart
agent.setup.camIP=10.14.0.35
agent.setup.camPort=7080
agent.setup.camSSLPort=7443
agent.setup.camSecure=yes
agent.setup.camLogin=hqadmin
agent.setup.camPword=hqadmin
agent.setup.agentIP=10.14.0.79
agent.setup.agentPort=2144
agent.setup.resetupTokens=no
#
agent.setup.unidirectional=yes

To allow the agent to discover vSphere details, select the Resources tab -> windows server -> hostname VMware vCenter -> Inventory tab. Edit the Configurations Properties (near the bottom of the page) add a username and password that can access the vCenter sdk. After a few minutes a refresh of the Dashboard should start to show discovered ESX/ESXi hosts and VMs  in the Recently Added pane.

The ESXi hosts will show up under the Resources tab under Platforms, along with your agents. Under Resources -> HQ VSphere you get a topology view of vCenter/Host/VM

There seems to be a lot of options for monitoring and alerting which I haven’t really looked into yet but it looks quite promising.

A big issue is that it doesn’t seem all that stable at the moment (it could be because this was a quick demo install and I haven’t really tuned it at all) for example once or twice I deleted one agent in the Resources tab and several resources disappeared. If an agent disappears from view it seems one way to get it back is to stop the agent and then delete the contents of the data directory and then when the agent is restarted (with hq-agent.bat start) it then registers again on the server.

The next problem I encountered was adding a second vSphere server, the view under Resources->HQ vSphere got very confused. First off both vCenter servers were listed but the host servers were under  the wrong vCenter server , then one of the vCenter servers disappeared completely.

I’ll continue to test it and search forums to see if there are any solutions to these problems.

If agents are installed in the running VMs as well it seems that you can drill down from your running vSphere server, to host server, to VM and then down to applications running in that VM. This could prove quite useful in problem solving any particular issues with performance.

Comments»

1. Heath - September 16, 2010

Thanks for the tips! God forbid they put that in the documentation anywhere. I have it working sort of…
I have followed everything above trying different users, passwords etc, but still no luck. The Vsphere Server shows, but cannot get any of the ESX hosts or VMs to show up. I did find that I had to open up port 2144 on the Windows 2008 firewall to get the agent to run. Did you have to open any other ports for SOAP/SDK?

2. vneil - September 16, 2010

I didn’t have to open any ports, my vCenter Server is still running on W2003 with no firewalls inbetween. You could try posting a question on the forum, it worked for me. I found that I had to stop and start the agent from the command line with hq-agent.bat rather than in the services.msc.

I did get an answer to my problem of the adding two vCenter servers causing corruption. The solution seems to be to change the http://localhost/sdk in the configuration properties of the vCenter resource to be http://ip-address/sdk as it must use this as some sort of identity of the resource and having two the same causes problems.


Leave a reply to vneil Cancel reply