How to configure the db2 probe when there is no default DB2 instance

Document ID : KB000033893
Last Modified Date : 14/02/2018
Show Technical Document Details


How to configure the db2 probe when there is no default DB2 instance


The db2 probe Help documentation indicates the following:

"To access DB2 connectivity has to be set. That means for default local instance DB2INSTANCE has to be set. Remote or additional local instances have to be cataloged in the DB2 node directory. Monitored databases have to be cataloged in the database directory."

It IS possible to monitor DB2 instances in environments where there is no default DB2 instance. The probe only requires that the DB2INSTANCE and DB2INSTDEF variables be set.

In the robot environment where the db2 probe is installed, set the variable DB2INSTANCE to any existing instance on the monitored DB2 server in the robot environment.

You would configure this through the controller GUI:

Select the Environment subtab from the main setup tab
Right click in the robot environment variables pane and select New
Specify the DB2INSTANCE variable and the instance name you want the db2 probe to connect to as the value
After selecting OK, the DB2INSTANCE variable is added to the robot environment

The DB2INSTDEF variable is set at the system level by executing the following commands (where your db2 default instance is installed):

On Linux/UNIX:
db2set DB2INSTDEF=<instanceName> -g

On Windows:
db2set DB2INSTDEF=<instanceName> -g

Once the DB2INSTDEF variable is set on the db2 system, restart the robot service on the server where the db2 probe is installed.

You can choose any db2 instance to be your default instance. The db2 probe will then use this instance to connect but will monitor all the other instances.

Alternatively, for some situations, you could create a local "dummy " instance. Then this instance can be used as a 'gateway.' Once the gateway is created your DBA would need to catalogue the databases to be monitored as local.