Starting the InformixHQ Agent

This topic covers the two ways of starting the InformixHQ Agent.

To get the most out of InformixHQ, you should have an InformixHQ agent running for each Informix database server that you will be monitoring through the tool. While the InformixHQ agent is not required to view information about your database server in the InformixHQ UI, the agent is required if you want to gather monitoring data and configure alerts for that server.

There are two options for starting the InformixHQ agent. You can use the InformixHQ UI to automatically deploy and start the InformixHQ agent or you can manually start the InformixHQ agent on the command line.

Deploying and starting the InformixHQ agent automatically from the UI:

Before you deploy and start the InformixHQ agent automatically from the UI, you must meet the following prerequisites:

Prerequisites

  1. SSH must be installed on the database server’s host machine.
  2. The informixhq-agent.jar file and the informixhq-server.jar file must be located in the same directory. For customized logging, the agent.log4j.xml file must also be included in the same directory.
To deploy and start the InformixHQ agent automatically from the UI:
  1. The Informix database server that the agent will be monitoring must first be defined in InformixHQ. If the database server has not been defined yet, in the UI, navigate to an InformixHQ group, click Add Server and define the server’s connection properties.
  2. Navigate to the Informix database server’s Setup > Agent page and define a repository server and database. The repository database is where the monitored data will be stored.
  3. From the server’s Setup > Agent page, you can also try to deploy the agent with default configuration by clicking the Deploy Agent button. If the automatic deployment is successful, you are done. Otherwise, proceed to the next step.
  4. Configure agent deployment:
    • Username: remote user which will own and run the agent
    • Password or Identity File/Passphrase: remote user’s passphrase or remote user’s identity file (e.g. private key) and its optional passphrase.
    • Remote directory: Directory to deploy the agent files to. This directory will be created if it does not exist.
  5. If SSL is enabled, keystore configuration may be required as well. If keystore configuration is not provided, InformixHQ will try to generate and deploy a keystore for you.
    • Keystore file: Location of an existing keystore on the remote machine (can be relative to the remote directory)
    • Keystore password: Password used to access the existing keystore
    • Keystore type: Existing keystore’s type. Default is JKS
  6. Click Deploy Agent
  7. Once the agent is ready, use the InformixHQ UI in your web browser to configure the monitoring profile and alerts for this server.

Starting an InformixHQ agent manually on the command line:

  1. The Informix database server that the agent will be monitoring must first be defined in InformixHQ. If the database server has not been defined yet, in the UI, navigate to an InformixHQ group, click Add Server and define the server’s connection properties.
  2. Navigate to the Informix database server’s Setup > Agent page and define a repository server and database. The repository database is where the monitored data will be stored
  3. Locate the informixhq-agent.jar and the agent.log4j.xml file in the $INFORMIXDIR/hq directory of the InformixHQ database server installation.
    Note: Staring from 14.10.xC4 onwards, you can start the agent using an alternate method. For more information on this, see and Starting the InformixHQ Server and the Agent on Windows and Starting the InformixHQ Server and the Agent on Linux.
  4. Copy the agent jar file and the log4j2 configuration file to the Informix database server host machine.
  5. Create an agent configuration file.

    Sample agent configuration file:

    # host and port of the InformixHQ server
    server.host=localhost
    server.port=8080
    
    # The id of the Informix database server as defined in InformixHQ
    informixServer.id=1
    
    Note: You can find the id of your Informix database server by navigating to the server’s Setup page in the UI.
  6. Optionally, edit the agent.log4j.xml file to configure logging in the InformixHQ. If agent.log4j.xml is not provided, default logging configuration is set and it gives warning as shown below.
  7. Start the InformixHQ agent using the following command
    java -jar informixhq-agent.jar agent.properties

    where agent.properties is the name of your InformixHQ agent configuration file.

    Sample output after starting the agent with agent.log4j.xml:

    Sample output after starting the agent without providing agent.log4j.xml:

  8. At this point the agent is ready and running. Use the InformixHQ UI in your web browser to configure the monitoring profile and alerts for this server.