In vSphere are used by VMware two application servers, one is Apache Tomcat (mostly in version 6) and its counterpart from the Spring Source, Pivotal tcServer (mostly in version 7). All the important features such as vCenter operate on tcServer, less important solutions are slowly migrated from Tomcat to tcServer. By default, both servers support remote monitoring, but do not have it enabled. Monitoring the application server written in Java, is done using the JMX Remote Access console. Locally installed vCenter Hyperic agent on the vCenter Server 5.5 detects correctly SpringSource tc Runtime 7.0, but will not be able to connect to it.
On tcServer (for example, vCenter 5.5 installed on Windows Server 2012R2), we need to open the file C:\Program Files\VMware\Infrastructure\tomcat\conf\server.xml where we will find the following line:
Base.jmx.port is defined in the file catalina.properties, the default value is -1. We can improve this value directly in catalina.properties or server.xml (preferably introduce the default value 6969). Next, we have two options to choose from, we set the parameter “authenticate” to “false”, we will restart vCenter and the agent will connect without a problem. We can also leave authentication enabled and prepare jmxremote.password file. Given that the JMX console is issued locally, Hyperic agent is also installed locally and the user admin has the right to read only (jmxremote.access), we can safely disable authentication. After the restart vCenter, look into the Hyperic:
All vCenter metrics are collected properly by the Agent. What it might come in handy? Alert e-mail notifying you turn off the vCenter it once, and the two are able to use the App vSphere HA to restart the vCenter service. It’s entirely possible, vSphere HA app works independently of vCenter communicates directly with the vCenter that manages Hyperic actions performed by the agent.
For any Apache Tomcat, we need to find the file startup.sh (bat) or setenv.sh (bat) and add at the beginning of the line:
CATALINA_OPTS=”-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6969 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false“
If we are dealing with Windows Server, and we do not find these files, we need to locate the file wrapper.conf to which we add another line wrapper.java.additional.n with content as above (without CATALINA_OPTS =). The proper location of all configuration files can be drawn directly from the vCenter Hyperic configuration of the server, the box “catalina.base”. We should also remember that each additional JMX console should be exposed to the following ports (eg 6969, 6968, 6967), as is the case with our vCenter (Hyperic has detected three Tomcat services and one tcServer). If we have DRS enabled cluster with application monitoring, it can additionally to check the status of our application servers from the vSphere Web Client (and of course assign the policies App HA).
Resource monitoring using vCenter Hyperic is quite expensive in a virtual environment, each agent consumes about 135MB ram (plus CPU cycles). Nevertheless, it is worth to use it, especially for critical applications. Only vCenter Hyperic give insight into such detailed statistics and only he will perform automatic actions on applications such as restart.
Was this information is helpful? Tell me, please leave a comment!