Configuring Db2 monitoring

The Monitoring Agent for Db2® monitors the availability and performance of the Db2 server. You can monitor multiple servers from the Cloud APM console; each server is monitored by a Db2 agent instance. Remote monitoring is also supported by Db2 agent.

Before you begin

Review hardware and software prerequisites. For the up-to-date system requirement information, see the Software Product Compatibility Reports (SPCR) for the Db2 agent.

About this task

The Db2 agent is a multiple instance agent, you must first create the instance and then start the agent manually.

The managed system name includes the agent instance name that you specify, for example, instance_name:host_name:pc.

Where:
  • The pc is your two character product code.
  • The instance_name is the agent instance name, and it must be the same as the Db2 instance name that is to be monitored.
The managed system name can contain up to 32 characters. The agent instance name that you specify can contain up to 8 characters, excluding the length of your host name. For example, if you specify DB2inst1 as your agent instance name, your managed system name is DB2inst1:hostname:ud.
Important: If you specify a long agent instance name, the managed system name is truncated and the agent code is not displayed completely.

To avoid permission issues when you configure the agent, be sure to use the same root user or non-root user ID that was used for installing the agent. If you installed your agent as a selected user and want to configure the agent as a different user, see Configuring agents as a non-root user. If you installed and configured your agent as a selected user and want to start the agent as a different user, see Starting agents as a non-root user.

Run the configuration script to create an instance and change the configuration settings. You can edit the Db2 silent response file before you run the configuration script to bypass the prompts and responses that are otherwise necessary.

After you configure the Db2 agent, be sure to start the agent with a user ID that has the Db2 SYSADM authority for the monitored instance. The agent requires the SYSADM authority to turn on all monitor switches and collect the monitoring data. Therefore, a user with the SYSADM authority must start the agent. Use the instance owner user, which has the SYSADM authority, to start the agent.

The directions here are for the most current release of this agent. For information about how to check the version of an agent in your environment, see Agent version command. For detailed information about the agent version list and what's new for each version, see Change history.

Procedure

To configure the agent with the default settings, complete the following steps:

  1. Run the following command where instance_name is the name that you want to give to the instance:
    install_dir/bin/db2-agent.sh config instance_name
    install_dir/samples/db2_silent_config.txt
    The agent instance name instance_name is always the same as the Db2 instance name that is being monitored. For more details about the existing agent instances, refer Agent Configuration page
  2. Run the following command to start the Db2 agent:
    install_dir/bin/db2-agent.sh start instance_name

What to do next