User Tools

Site Tools


en:ressources:dossiers:supervision:hyperic

Hyperic

Server Installation

Postgresql Database

Connect as user postgres to psql Create a hyperic admin account

postgres=# CREATE ROLE hypericadmin WITH login password 'owie983hf';
CREATE ROLE

Create the database

postgres=# CREATE DATABASE "HQ" owner hypericadmin;
CREATE DATABASE

Change parameters in /var/lib/pgsql/data/postgresql.conf

##performance changes for HQ
shared_buffers=10000
work_mem=2048
statement_timeout=30000

Modify listen_address in /var/lib/pgsql/data/postgresql.conf to listen on localhost

listen_addresses = 'localhost'

Add the password authentication method to pg_hba.conf, and deactivate IDENT method

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
#local   all         all                               ident sameuser
# IPv4 local connections:
#host    all         all         127.0.0.1/32          ident sameuser
host    all         all         127.0.0.1/32          password
# IPv6 local connections:
#host    all         all         ::1/128               ident sameuser

Test the connection using:

$ psql -U hypericadmin  -h 127.0.0.1 -p 5432 -d 'HQ' -W

Hyperic Server installation

Create a hyperic user

$ sudo /usr/sbin/useradd -d /opt/hyperic-server/ -m -r -s /bin/bash hyperic

Untar the server components into /opt/hyperic-server/

$ sudo su hyperic
$ cd /opt/hyperic-server/
$ tar -xzvf /home/jvehent/hyperic/hyperic-hq-installer-4.5-x86-64-linux.tar.gz
$ ls
hyperic-hq-installer-4.5

Launch the installation script with the -postgresql option to prompt for pgsql parameters:

$ ./hyperic-hq-installer-4.5/setup.sh -postgresql
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.
1
HQ server installation path [default '/home/hyperic']:
/opt/hyperic-server/
Enter the JDBC connection URL for the PostgreSQL database [default 'jdbc:postgresql://localhost:5432/HQ?protocolVersion=2']:
jdbc:postgresql://localhost:5432/HQ?protocolVersion=2
Enter the username to use to connect to the database:
hypericadmin
Enter the password to use to connect to the database.: 
(again): 
Enter an encryption key to use to encrypt the database password.:
fwieifwihfwhwi
Loading install configuration...
Install configuration loaded.
Preparing to install...
Validating server install configuration...
Checking server webapp port...
Checking server secure webapp port...
Checking database permissions...
Verifying admin user properties
Validating server DB configuration...
Installing the server...
Unpacking server to: /opt/hyperic-server/...
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...
Loading taskdefs...
Taskdefs loaded
Installing the server JRE ...
Unpacking JRE amd64-linux-1.6.tar.gz to: /opt/hyperic-server//server-4.5...
Setting permissions on server binaries...
Fixing line endings on text files...
--------------------------------------------------------------------------------
Installation Complete:
  Server successfully installed to: /opt/hyperic-server//server-4.5
--------------------------------------------------------------------------------
 
 
 You can now start your HQ server by running this command:
 
  /opt/hyperic-server/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://ip-10-112-54-178.ec2.internal: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:
  /opt/hyperic-server/hyperic-hq-installer-4.5/installer/logs/hq-install.log
 
Deleting temporary JRE

Client Installation

Create a hyperic user on the node to monitor, and untar the agent file into /opt/hyperic-client/

$ sudo useradd -d /opt/hyperic-client/ -m -r hyperic
$ sudo su hyperic
$ cd ~
$ tar -xzvf hyperic-hq-agent-4.5-x86-64-linux.tar.gz 

Start the Agent, the startup process will prompt for the configuration parameters:

$ /opt/hyperic-client/hyperic-hq-agent-4.5/bin/hq-agent.sh start
Starting HQ Agent...
[ Running agent setup ]
What is the HQ server IP address: 1.2.3.4
Should Agent communications to HQ always be secure [default=no]: 
What is the HQ server port     [default=7080]: 
- Testing insecure connection ... Success
What is your HQ login [default=hqadmin]: hqadmin
What is your HQ password: 
What IP should HQ use to contact the agent [default=5.6.7.8]: 
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
    1300119383055-3043578642620364530-5152087890925512228
- Informing agent of new HQ server
- Validating
- Successfully setup agent

The same parameters can be kept in a static file, in /opt/hyperic-client/hyperic-hq-agent-4.5/conf/agent.properties

# HQ Server address and port (clean / ssl)
agent.setup.camIP=1.2.3.4
agent.setup.camPort=7080
agent.setup.camSSLPort=7443
agent.setup.camSecure=yes
agent.setup.camLogin=hqadmin
agent.setup.camPword=secretpassword
agent.setup.agentIP=5.6.7.8
agent.setup.agentPort=2144
agent.setup.resetupTokens=no

Monitor a JVM

JVM monitoring is done using a plugin. You first need to discover the path of the JAVA installation, using the parameters:

## auto discover sun jvm
jmx.sun.discover=true

in agent.properties. Then restart the agent and launch a discovery from the web interface. It should find the JVM (if you provide the proper location).

Then, you can connect to the JMX console using the JMX plugin. Modify the configuration of the plugin in hyperic-hq-agent-4.5/bundles/agent-4.5/pdk/plugins/jmx-plugin.xml and change the port of the JMX console:

<plugin name="jmx" package="org.hyperic.hq.product.jmx">

  <classpath>
    <include name="pdk/lib/mx4j"/>
  </classpath>

  <config name="jmx" type="global">
    <option name="jmx.url"
            description="JMX URL to MBeanServer"
            default="service:jmx:rmi:///jndi/rmi://localhost:8998/jmxrmi"/>

Restart the agent again and, from the interface, go to the inventory of the JVM. Remove the username and password if any, and you should be able to list the ressources exposed by the JMX console.

en/ressources/dossiers/supervision/hyperic.txt · Last modified: 2024/04/17 10:19 by 127.0.0.1