Getting Started with Hyperic 4.5

Home

Hyperic is a powerful and valuable tool for your consideration if you want Management and Monitor and even it offer you to take advantage of other important features in benefits for your Java Enterprise Applications. Furthermore Hyperic can work with vFabric and Cloud Foundry

This is the first of many series of articles based with this tool. So the first article should be like you expect, download and installation.

Hyperic offer two versions to be downloaded, the Enterprise and Open Source. The difference is the additional features that offer the Enterprise than the Open Source

In these series I will work with both versions to show you the capabilities of each one and finally encourage you, to consider to buy without any doubt the Enterprise version. I will start with the Open Source version.

OK Lets go !

Step 01: Downloading the Server and Agent installers

You can go to Hyperic’s home page and you have two ways to get the software, for either chosen way, you should arrive to the same target page.

The first way, do click directly on Download link menu, where then you can see both versions to your choice. Even this page show you the features available for each one.

The second way is simply move your mouse’s pointer over the Download link menu and wait to show you both versions and finally click in anyone of them.

For any case and since I said we going to start with the Open Source version, you must arrive to Download Hyperic HQ open source edition. Proceed to fill the form and click on the Download Now button.

After that, you have two softwares of your consideration:

  • Hyperic Server Package – Core monitoring engine & user interface that allows you to manage your entire IT infrastructure from one central computer.
  • Hyperic Agent Package – Each platform that you wish to monitor requires an “agent” to report back to the Hyperic server (i.e. if you wish to monitor Apache on Linux, and Apache on Solaris, you’d want to download both the Linux and Solaris agent packages).

The last and stable version available is 4.5

Below some snapshots of the target page

Figure 01: Step 1 – Download the Hyperic Server Package

Figure 02: Step 2 – Download the Hyperic Agent Package(s)

Even you have a final step about documentation, show below

Figure 03: Step 3 – Install and Configure

For the Hyperic Server Package and Hyperic Agent Package installers, I will use Linux for 32 bits. The files names are respectively:

  • hyperic-hq-installer-4.5-x86-linux.tar.gz
  • hyperic-hq-agent-4.5-x86-linux.tar.gz

About Linux I am working with Fedora Core 15, I am assuming you already have installed and configured the last Java version available from Oracle. It is Java SE Development Kit 6 Update 29

I will start working with the Server file. It is hyperic-hq-installer-4.5-x86-linux.tar.gz

Step 02: Unpack The Server File

Open your First terminal. I will work on my own directory /home/Section1/whiteroom/springsource/hyperic/4.5. Consider this location like our root directory. Therefore from there, I will create the directory server only for unpack and installation purposes. BTW, is not mandatory has the same directories names like me. Proceed to move to the directory server to unpack the package hyperic-hq-installer-4.5-x86-linux.tar.gz.

Therefore in the location /home/Section1/whiteroom/springsource/hyperic/4.5/server we must have a new directory named hyperic-hq-installer-4.5. You should get within this new directory the follow files shown below

Figure 04: hyperic-hq-installer-4.5-x86-linux.tar.gz unpacked

Do realize yourself we have even other two packed files: hyperic-hq-agent-4.5-x86-linux.tar.gz and server-4.5.tar.gz. Like a quickly introduction, really from them, we are able to install the Server and the Agent.

Step 03: Executing the setup script

In the first terminal, proceed to enter to this new directory hyperic-hq-installer-4.5 and execute the follow command chmod +x setup.sh and then execute the script setup.sh, you should get the follow in your terminal

[Section1@localhost hyperic-hq-installer-4.5]$ chmod +x setup.sh
[Section1@localhost hyperic-hq-installer-4.5]$ ./setup.sh
Unpacking JRE to temporary directory /tmp/jre
Please ignore references to missing tools.jar
Unable to locate tools.jar. Expected to find it in /tmp/lib/tools.jar
Loading taskdefs...
Taskdefs loaded
Initializing Hyperic HQ 4.5 Installation...
Choose which software to install:
1: Hyperic HQ Server
2: Hyperic HQ Agent
You may enter multiple choices, separated by commas.

I will choice the option 1 because I want to start to work with the server, while this process, it ask for a target directory and a password. Well, the target directory to install will be /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5 and to keep the things simple the password will be springsource. Below all together.

You may enter multiple choices, separated by commas.
1
HQ server installation path [default '/home/hyperic']:
/home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5
Enter an encryption key to use to encrypt the database password.:
springsource

After to write these values you going to receive the follow output

Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating server install configuration...
Checking server webapp port...
Checking server secure webapp port...
Verifying admin user properties
Validating server DB configuration...
Installing the server...
Unpacking server to: /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5...
Creating server configuration files...
Copying binaries and libraries to server installation...
Copying server configuration file...
Copying server db-upgrade files...
Copying server libs...
Setting up server database...


Now login to another terminal as root and execute this script:

    /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/installer/data/hqdb/tune-os.sh

This script sets up the proper shared memory settings to run the
built-in database.

Press Enter after you run the script to continue this installation.

Step 04: Sets up the proper shared memory settings to run the built-in database

This step name comes from the final indications shown on Step 03.

This script sets up the proper shared memory settings to run the
built-in database.

Other important indication shown on Step 03 is:

Now login to another terminal as root and execute this script:

    /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/installer/data/hqdb/tune-os.sh

Therefore open a Second terminal. Dont forget you must work here with root privilegies.

[Section1@localhost hyperic-hq-installer-4.5]$ su
ContraseƱa: 
[root@localhost hyperic-hq-installer-4.5]# cd /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/installer/data/hqdb
[root@localhost hqdb]# 

BTW contraseƱa=password. Just to be curious, lets see what files we have on this directory

[root@localhost hqdb]# ls
conf  pgsql.tar.gz  tune-os.sh
[root@localhost hqdb]# 

Then execute the script tune-os.sh

[root@localhost hqdb]# ./tune-os.sh
/etc/sysctl.conf does not define kernel.shmmax, adding it
	
Tuning completed successfully!
	
[root@localhost hqdb]# 

Thats all for this step

Step 05: Executing the setup script

Recall that the last indication show on Step 03 was Press Enter after you run the script to continue this installation.. Recall again this indication is shown on the first terminal, do it and you should see the follow long final output.

Press Enter after you run the script to continue this installation.


Setting up JDBC driver...
Copying database files...
Configuring database...
Loading taskdefs...
Taskdefs loaded
Starting repopulation of configuration table...
Starting built-in database...
Waiting for built-in database to start (on port 9432)...
Preparing database...
Loading taskdefs...
Taskdefs loaded
Loading taskdefs...
Taskdefs loaded
Loading taskdefs...
Taskdefs loaded
Waiting for server to stop...
Stopping built-in database...
Built-in database stopped.
Installing the server JRE ...
Unpacking JRE x86-linux-1.6.tar.gz to: /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/server-4.5...
Setting permissions on server binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
  Server successfully installed to: /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/server-4.5
--------------------------------------------------------------------------------


 You can now start your HQ server by running this command:

  /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/server-4.5/bin/hq-server.sh start

 Note that the first time the HQ server starts up it may take several minutes
 to initialize.  Subsequent startups will be much faster.

 Once the HQ server reports that it has successfully started, you can log in
 to your HQ server at: 

http://localhost.localdomain:7080/

  username: hqadmin
  password: hqadmin

 To change your password, log in to the HQ server, click the "Administration"
 link, choose "List Users", then click on the "hqadmin" user.


Setup completed.
A copy of the output shown above has been saved to:
  /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/installer/logs/hq-install.log

Deleting temporary JRE
[Section1@localhost hyperic-hq-installer-4.5]$ 

If you check the ouput shown above, it indicate that the installation was done on the directory server-4.5, where it is located within our directory hyperic-hq-installer-4.5. Therefore, until this point we practically unpacked the file server-4.5.tar.gz creating the directory server-4.5. Below the final result of this process.

Figure 05: directory hyperic-hq-installer-4.5

Just to be curious lets see the files contained within the directory server-4.5. It is show in the follow image

Figure 06: directory server-4.5

Step 06: Starting The Server

In the previous Step 05 we have the follow indication

 You can now start your HQ server by running this command:

  /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/server-4.5/bin/hq-server.sh start

Then open a Third terminal and move to the indicated directory
/home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/server-4.5/bin/ and execute the script with the suggested argument hq-server.sh start. BTW, is not necessary has root privilegies

[Section1@localhost bin]$ ./hq-server.sh start
Starting HQ Server...
[Section1@localhost bin]$ 

Step 07: Working with Hyperic

Again, from Step 05 we have the follow indication

Once the HQ server reports that it has successfully started, you can log in
 to your HQ server at: 

http://localhost.localdomain:7080/

  username: hqadmin
  password: hqadmin
 

OK, open your favorite Web Browser and use the follow URL http://localhost.localdomain:7080/. You should see the follow image

Figure 07: Opening Hyperic’s Login Page

Once you write the username and password you must see the follow image

Figure 08: Hyperic’s Welcome Page

If you want change the default password, from Step 05 we have the follow indication

 To change your password, log in to the HQ server, click the "Administration"
 link, choose "List Users", then click on the "hqadmin" user.

Step 08: Shutdown The Server

Until this point we have a successful instalation and startup of the Hyperic 4.5 Open Source‘s Server.

If you want to shutdown the server, just execute the follow script with the indicated argument hq-server.sh stop

[Section1@localhost bin]$ ./hq-server.sh stop
Stopping HQ Server...
Waiting for HQ Server to exit...
Stopped HQ Server.
[Section1@localhost bin]$ 

Step 09: Install The Agent

Now is the turn to install the Agent, we can do this returning to our first terminal, if you closed it by mistake afterwards to shutdown the server, open a new terminal and go to
/home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5. Then again execute the script setup.

[Section1@localhost hyperic-hq-installer-4.5]$ ./setup.sh
Unpacking JRE to temporary directory /tmp/jre
Please ignore references to missing tools.jar
Unable to locate tools.jar. Expected to find it in /tmp/lib/tools.jar
Loading taskdefs...
Taskdefs loaded
Initializing Hyperic HQ 4.5 Installation...
Choose which software to install:
1: Hyperic HQ Server
2: Hyperic HQ Agent
You may enter multiple choices, separated by commas.

Now we must choice the option 2, and thats all. Below the final result of this process

You may enter multiple choices, separated by commas.
2
HQ agent installation path [default '/home/hyperic']:
/home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5
Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating agent install configuration...
Installing the agent...
Looking for previous installation
Unpacking /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/hyperic-hq-agent-4.5-x86-linux.tar.gz to: /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/agent-4.5...
Setting permissions on agent binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
  Agent successfully installed to: /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5
--------------------------------------------------------------------------------
You can now start your HQ agent by running this command:

       /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/agent-4.5/bin/hq-agent.sh start

Setup completed.
A copy of the output shown above has been saved to:
  /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/installer/logs/hq-install.log

Deleting temporary JRE
[Section1@localhost hyperic-hq-installer-4.5]$ 

Therefore, until this point we practically unpacked the file hyperic-hq-agent-4.5-x86-linux.tar.gz creating the directory agent-4.5. Below the final result of this process.

Figure 09: directory hyperic-hq-installer-4.5

Just to be curious lets see the files contained within the directory agent-4.5. It is show in the follow image

Figure 10: directory agent-4.5

Step 10: Startup The Agent

From the previous Step 09 final output, we have the follow indication

You can now start your HQ agent by running this command:

       /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/agent-4.5/bin/hq-agent.sh start

Then open a Fourth terminal and move to /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/agent-4.5/bin/ and execute the follow script with the indicated argument hq-agent.sh start. Below the execution.

[Section1@localhost hyperic-hq-installer-4.5]$ cd  /home/Section1/whiteroom/springsource/hyperic/4.5/server/hyperic-hq-installer-4.5/agent-4.5/bin/
[Section1@localhost bin]$ 

[Section1@localhost bin]$ ./hq-agent.sh start
Starting HQ Agent...
[ Running agent setup ]
What is the HQ server IP address: 127.0.0.1
Should Agent communications to HQ always be secure [default=no]: yes
What is the HQ server SSL port [default=7443]: 
- Testing secure connection ... Failure

Mmmm, a Testing secure connection … Failure???. Why?. That’s correct, in Step 08 I executed the script to shutdown the server, therefore in such terminal proceed to startup the server again. Read the Step 06 to know where and how start it. Once done this, lets try again

[Section1@localhost bin]$ ./hq-agent.sh start
Starting HQ Agent...
[ Running agent setup ]
What is the HQ server IP address: 127.0.0.1
Should Agent communications to HQ always be secure [default=no]: yes
What is the HQ server SSL port [default=7443]: 
- Testing secure connection ... Success
What is your HQ login [default=hqadmin]: 
What is your HQ password: 
What IP should HQ use to contact the agent [default=192.168.1.34]: 
What port should HQ use to contact the agent [default=2144]: 
- Received temporary auth token from agent
- Registering agent with HQ
- HQ gave us the following agent token
    1320779560575-3116430871852762436-4839775377226105482
- Informing agent of new HQ server
- Validating
- Successfully setup agent
[Section1@localhost bin]$ 

Is important to know that only the first time we start the Agent some values are required. Just check the output above again

Until this point we have a successful instalation and startup of the Hyperic 4.5 Open Source‘s Agent.

Step 11: Shutdown The Agent

To turn off your PC, you must shutdown first the Agent and then the Server. For the Agent just execute the follow script with the argument indicated hq-agent.sh stop

[Section1@localhost bin]$ ./hq-agent.sh stop
Stopping HQ Agent...
Stopped HQ Agent.
[Section1@localhost bin]$ 

To Stop de Server just read the Step 08

Step 12: Setting Setup (Optional)

If you for any reason you want change some configuration done for the Agent. You must use again the script hq-agent.sh. See below the execution of this command.

[Section1@localhost bin]$ ./hq-agent.sh
Usage: ./bundles/agent-4.5/bin/hq-agent.sh { start | stop | restart | status | dump | ping | setup }

Lets work with the setup argument

[Section1@localhost bin]$ ./hq-agent.sh setup
Unable to setup agent: Unable to connect to 127.0.0.1:2144: Connection refused
The Agent must be running prior to running setup
[Section1@localhost bin]$ 

Lets see what return with the status argument

[Section1@localhost bin]$ ./hq-agent.sh status
HQ Agent is not running.
[Section1@localhost bin]$

For both cases we have practically got the same message about the Agent is not running. OK, we proceed to startup it.

[Section1@localhost bin]$ ./hq-agent.sh start
Starting HQ Agent...
[Section1@localhost bin]$ 

Lets work with the setup argument again

[Section1@localhost bin]$ ./hq-agent.sh setup
[ Running agent setup ]
What is the HQ server IP address: 127.0.0.1
Should Agent communications to HQ always be secure [default=no]: yes
What is the HQ server SSL port [default=7443]: 
- Testing secure connection ... Success
What is your HQ login [default=hqadmin]: 
What is your HQ password: 
What IP should HQ use to contact the agent [default=192.168.1.34]: 
What port should HQ use to contact the agent [default=2144]: 
- Agent is already setup for HQ @ https://127.0.0.1:7443/lather
Would you like to re-setup the auth tokens [default=no]: yes
- Received temporary auth token from agent
- Registering agent with HQ
- HQ gave us the following agent token
    1320782468294-7630720779988242626-607376425292238385
- Informing agent of new HQ server
- Validating
- Successfully setup agent
[Section1@localhost bin]$

It is almost the same interaction shown on Step 10, we have a new line Would you like to re-setup the auth tokens [default=no]: yes and practically the rest is the same.

Lets see what return with the status argument again

[Section1@localhost bin]$ ./hq-agent.sh status
HQ Agent is running (PID:5230).
Current agent bundle: agent-4.5
Server IP address: 127.0.0.1
Server (SSL) port: 7443
Agent listen port: 2144
[Section1@localhost bin]$

Some considerations

Until this point we have installed the Server and Agent for a same machine. What happen if we have a node or other PC to be monitored?. Even more if you recall the Step 01 we downloaded two files and we only used only the first.

  • hyperic-hq-installer-4.5-x86-linux.tar.gz
  • hyperic-hq-agent-4.5-x86-linux.tar.gz

Dont forget when we unpacked the file hyperic-hq-installer-4.5-x86-linux.tar.gz we work around with some scripts that work directly wih these files hyperic-hq-agent-4.5-x86-linux.tar.gz and server-4.5.tar.gz

Therefore, next, we will cover how install the Agent in a stand alone option in other machine. For quickly purposes, I will do this in the same machine.

Step 13: Unpack The Agent File

Open your fifth terminal. Recall my root directory /home/Section1/whiteroom/springsource/hyperic/4.5. I will create the directory agent only for unpack and installation purposes. BTW, is not mandatory has the same directories names like me. Proceed to move to the directory agent to unpack the package hyperic-hq-agent-4.5-x86-linux.tar.gz.

Therefore in the location /home/Section1/whiteroom/springsource/hyperic/4.5/agent we must have a new directory named hyperic-hq-agent-4.5. You should get within this new directory the follow files shown below

Figure 11: hyperic-hq-agent-4.5-x86-linux.tar.gz unpacked

Step 14: Startup The Agent

From our actual location /home/Section1/whiteroom/springsource/hyperic/4.5/agent, proceed to move to hyperic-hq-agent-4.5/bin and simply execute the follow script with the argument indicated hq-agent.sh start. Recall the Server must be running!

[Section1@localhost bin]$ ./hq-agent.sh start
Starting HQ Agent...
[ Running agent setup ]
What is the HQ server IP address: 127.0.0.1
Should Agent communications to HQ always be secure [default=no]: yes
What is the HQ server SSL port [default=7443]: 
- Testing secure connection ... Success
What is your HQ login [default=hqadmin]: 
What is your HQ password: 
What IP should HQ use to contact the agent [default=192.168.1.34]: 
What port should HQ use to contact the agent [default=2144]: 
- Received temporary auth token from agent
- Registering agent with HQ
- HQ gave us the following agent token
    1320782468294-7630720779988242626-607376425292238385
- Informing agent of new HQ server
- Validating
- Successfully setup agent
[Section1@localhost bin]$ 

Is important know the IP of the server and the port used by it

Again is important to know that only the first time we start the Agent some values are required. Just check the output above again. You would wondered by you are must again make this setup when it has been done on Step 10. The answer is simply. We are working with other installer. I mean an Agent is already included within the Server and this one is stand alone.

Step 15: Shutdown The Agent

Just execute the follow script with the argument indicated hq-agent.sh stop

[Section1@localhost bin]$ ./hq-agent.sh stop
Stopping HQ Agent...
Stopped HQ Agent.
[Section1@localhost bin]$ 

Final Notes:

Congratulations!!!. You have learned how adquire Hyperic Open Source 4.5 on Server and Agent presentations. And respectively how install, configure and startup each one.

You have learned too how install and startup the Agent stand alone.

In the follow articles I will you show you some interaction with Hyperic Server

Home

About these ads

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 40 other followers

%d bloggers like this: