Prerequisites for Remote Monitoring

You can use Monitoring Agent for Db2® for remote monitoring. Refer the topic for prerequisites of remote monitoring of Db2.

About this task

For remote monitoring of Db2, you must first do the basic Db2 client/server environment setup. Do this setup for Windows and UNIX or Linux®.

For this set up a user must have Db2 SYSADM or SYSCTRL authority.

Remember: Run all the steps on agent workstation except for step 2.

Procedure

  1. On the Db2 agent workstation, install Db2 client. The version of this client must be greater than or equal to that of Db2 server instance version that is to be monitored.
  2. Verify that the communication protocol for Db2 instance is TCPIP.
    1. To verify, run the command db2set on the Db2 command line.
    2. If it is not set to TCPIP, then run db2set DB2COMM=tcpip in Db2 command line.
    Important: This step is done at the server side.
  3. Catalog the remote server instance at Db2 agent workstation with following command.
    Important: The server instance is to be cataloged under the client instance. So run following command on the client instance.

    db2=>CATALOG TCPIP NODE<node_name> REMOTE <hostname/ip_address> SERVER <service_name/port_number>

    on Db2 where

    1. <node_name> represents a local nickname of Db2 instance on client component.
      Note: For UNIX or Linux, <node_name> must not be same as of any Db2 client or Db2 server instance name available on the same workstation.
    2. <hostname/ip_address> represents name or IP address of the Db2 server workstation.
    3. <service_name/port_number> at which Db2 TCPIP configured.
    To catalog Db2 server instance running on port number 50000 on remote server myserver as node db2node, enter the following command from a Db2 command line

    db2 => CATALOG TCPIP NODE db2node REMOTE myserver SERVER 50000

  4. If Db2 agent workstation is UNIX/Linux,
    • Create a user with node name, which is used in cataloging command

      Issue the command

      useradd -g <group> -m -d <home_dir> <user> -p <password>

      where
      • <group> represents a group for the DB2 UDB instance owners.
      • <user> represents a local username on client workstation. Userame must be same as node name by which the server instance has been cataloged on agent machine.
    • Check the Db2 client instance name under which remote Db2 server instance is cataloged and assign the read, write, execute permissions of the newly created user’s home directory to the owner of this instance. This step is necessary to make the client Db2 environment available for operations on remote node
    • Issue the command

      chmod -R 775 /home/<nodename>

      where

      • <nodename> represents a local username of Db2 instance on client component
  5. Catalog all the databases that you want to monitor on the client instance present at Db2 agent workstation.
    Issue the command in the Db2 CLP to catalog the database.

    CATALOG DATABASE <db_name> AS <db_alias> AT NODE <node_name>authentication server

    1. <db_name> represents server database name.
    2. <db_alias> represents local nickname for database at Db2 client.
    3. <node_name> represents a local nickname of Db2 instance on client component at which database is cataloged.
    To catalog a database called sample on catalog node db2node with alias as dbAlias1, enter the following command from a Db2 prompt.

    db2 => CATALOG DATABASE sample AS dbAlias1 AT NODE db2node authentication server