Installing Hyperic agents
Hyperic agents need to be installed on each machine that you wish to monitor. The agent will report the metrics back to the Hyperic server. In this recipe, we will learn how to install a Hyperic agent.
Getting ready
You will need to install the Hyperic agent install ZIP file plus the necessary permissions to log in, and install the software on the machine that runs your Oracle SOA Suite application. The Hyperic agent will need to be installed as the same user as Oracle SOA Suite, in order to detect it properly.
How to do it…
We can follow these steps to install our Hyperic agents:
- Extract the Hyperic agent ZIP file to the location where you want it to be installed.
- Navigate to the
bin
directory:cd bin
- Run the install task of the relevant
hq-agent
script—eitherhq-agent.sh
orhq-agent.bat
:hq-agent.bat install
- Run the start task of the relevant
hq-agent
script—eitherhq-agent.sh
orhq-agent.bat
:hq-agent.bat start
- The agent will start up, and start prompting for its configuration.
- Enter the IP address of the Hyperic server.
- Answer yes to using a secure communication between the agent and server.
- If you have not changed the SSL port for your Hyperic Server, accept the default port; otherwise enter your custom port.
- Enter the administration username for your Hyperic server.
- Enter the password for your Hyperic administration user.
- Accept the default IP for the agent bind address.
- Accept the default port for the agent port.
- If you are using the default self-signed SSL certificates, the agent will prompt for whether you wish to accept these. Enter yes.
- The agent install will complete.
- Use your web browser to connect to the Hyperic server console (usually
http://localhost:7080/console
): - Enter your administration username and password to log in.
- You will see that the agent has been discovered by the server, and is listed at the top-right of the dashboard:
- Click on the Add to Inventory button to accept the agent's request to send metrics to the Hyperic server.
How it works...
Many monitoring tools, including Hyperic, use a server and agent architecture. In this architecture, a lightweight agent process runs on each box to be monitored, collecting metrics and sending them back to the server, where they are processed and stored. An agent therefore needs to be installed on each machine that is running one of our WebLogic servers hosting SOA Suite 11g applications.
Hyperic agents are responsible for discovering resources, gathering metrics, and reporting them back to the Hyperic server. To do this, agents need to be installed on each machine that has resources to be monitored, which in our case, means WebLogic servers that are running Oracle SOA Suite.
The agent is implemented as a Java application, and is distributed as a ZIP file that can be extracted into a location. Scripts are provided for both the Windows and Linux versions of the agent; the Windows agent is run by installing it as a Windows service, and then starting that service. When it starts for the first time, it will prompt for its configuration data. This will be stored, and so the agent will no longer prompt for the configuration data once it has been set up. The agent is essentially a container for running plugins, with each plugin knowing how to discover and monitor a specific type of resource (such as a SOA Suite server). The monitoring of SOA Suite is accomplished by the WebLogic plugin, which uses the Java Management eXtensions (JMX) interface to connect to WebLogic and retrieve metrics. These metrics are the ones that the JMX subsystem in WebLogic and SOA Suite is already collecting. So the overhead of monitoring the platform is limited to that imposed by connecting to WebLogic, requesting the metrics, and then forwarding them to the Hyperic server. This allows the agents to have a very small overhead on the boxes they monitor (typically no more than 5 percent), although the overhead varies according to the number of metrics that are being collected.
When the agent first starts up and communicates with the server, the server places it in a list of resources that have been discovered but not yet added to the inventory. We need to log in to the server and accept the agent and its discovered resources into the inventory before any monitoring will occur.
There's more...
In these sections we have installed the Hyperic server and agent to use the default self-signed SSL certificates for secure communication. For a production deployment, it is recommended that these certificates are not used, and that you use real SSL certificates, or generate your own set of self-signed certificates.
See also
- The Installing the Hyperic server and Configuring Hyperic to monitor SOA Suite 11g recipes