Instana U

 View Only

IBM Db2 LUW multi instance and multi database monitoring with instana

By Vipin M V posted Sat May 21, 2022 08:48 AM


@Padmini Krishnamurthy @SANDHYA R



As Instana and APM gain momentum in the cloud market, we are focusing on continuously evolving of our sensors, to bring in new capabilities that provide a seamless experience. (In a previous blog, we described the observability features of Instana for Db2LUW.) In this blog, we will consider remote and local monitoring modes for Db2LUW sensor in Instana.


Instana provides enterprise observability to improve application performance management and accelerate CI/CD pipelines, no matter where applications reside. The Db2 sensor is designed to align to this model and so there are two modes of operation –local and remote. Local monitoring mode is when you can monitor a local Db2 process by the Instana agent running on the same platform, while the remote mode is for monitoring processes that are not local to the platform where the Instana agent resides. The mode of configuration for the Db2 sensor is different in these modes and has evolved over time to make it easier and bring in capabilities – such as multiple-instance and multiple databases. We will discuss this in detail.


Remote monitoring


Remote monitoring is the most popular mode of Db2 monitoring and allows you to monitor a Db2 process on a remote platform with the help of an existing agent. Remote monitoring is supported from v1.0.22. You can specify the list of databases along with username, password and the port number in the configuration file under the remote tag.


  1. Agent configuration


You need to configure the following fields in the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml:

Remote monitoring configuration

 Remote monitoring configuration

You can now group the list of databases under one specific instance and so for any given instance, there is no need to duplicate the credentials.

For more information, see configuration

  1. Monitoring

When visualizing remote databases over the Instana dashboard, you will see individual towers for each successfully-connected database. By hovering over each tower, you see all the information related to respective databases (fig. 1). Click their dashboards to  view the complete metrics of these databases.

Fig. 1


Local monitoring


Local monitoring is preferred for Db2 processes, which are local to the platform, where the Instana agent resides. Local monitoring can either be a local Db2 process running as a part of standalone installation on the host, or it can be a containerized Db2 process running as a part of Db2 docker container on the host. The user can configure any of them under the local tag.


  1. Agent configuration


To enable local monitoring, you will have to provide the configuration details such as username, password and the port number under the local tag. You can group the list of databases under a specific instance.

You need to configure the following fields in the agent configuration file  


Local monitoring configuration

Local monitoring configuration

Unlike remote monitoring, we take the instance name as an additional parameter to optimize the process lookup for configuration.  Customers who are migrating to Db2sensor version v1.0.24 may need this to be added to enable multi-database monitoring as shown in the sample configuration above. 

For more information, see configuration

             1.1 Backward compatibility


While v1.0.24 brought in changes to the local monitoring configuration, you can maintain backward compatibility for existing customers.


The configuration for db2 sensor < v1.0.24 is:

Single database monitoring configuration

Single database monitoring configuration


 If you want to continue with your single database monitoring setup as shown above, you don’t need to change anything as the old configuration is completely backward compatible. However, we suggest migrating to the new configuration to avoid warning messages from the sensor in the dashboard (Fig. 2).



  1. Local monitoring of Db2 on docker container is not supported on Windows OS.
  2. For Windows, the instance field should be the owner of the instance so the configuration can support multiple instances and multiple databases.




Fig. 2


  1. Monitoring


The main advantage of local monitoring is that it gives you a single host view with processes running in it as stacks. Any Db2 process discovered within the host is stacked up in the tower giving a listed view of all successful Db2 monitoring sensors (fig 3). 


The complete list of databases are also available to browse under each process from the dashboard to get into individual database metrics monitoring (Fig 4.)

Fig. 3


Fig. 4

 Note:  Local and remote monitoring cannot be configured together on a single agent and it needs a dedicated virtual machine. 



The main use case of local and remote monitoring is the way it is monitored in the Instana dashboard. As described, local monitoring happens as a part of the host while remote monitoring forms a separate tower as an isolated process from the host where the Instana agent is running.


Instana is designated for both local and remote monitoring. It is your preference to decide on the mode of monitoring.