DB2 JDBC connection setup

After you have installed the PATROL for IBM DB2, you must configure a monitoring policy. You can use the information in this topic to configure a DB2 JDBC monitoring policy with the TrueSight console.

This topic includes the following information:

Before you begin

You must download and install the PATROL for IBM DB2.

To configure the monitor type

In the Add Monitoring Configuration panel, select the following parameters for the DB2 JDBC monitor type:

Parameter

Selection

Monitoring SolutionIBM DB2
Monitoring ProfileIBM DB2
Monitor TypeDB2 JDBC connection setup

To add an environment configuration

Click Add and enter the Environment Configuration details.

FieldDescription
Environment Name

Enter a unique environment name for monitoring the DB2 databases. A container will be created with the environment name. This environment will hold all the DB2 instances.

The name cannot include blank spaces or any of the following special characters: $|?\"[]+=&*();!^<>:/


IBM DB2 Database JDBC Connection Details
Host/IPEnter a valid database Host name or an IP address. BMC recommends you to provide only alphanumeric characters in database host name. Each environment can contain a single unique host name.
PortEnter the port number. The remote database port number is a 5 digit number. Default port number is 50000.
Database NameEnter a unique name for the database. BMC recommends you to provide only alphanumeric characters in database name.
IBM DB2 database authentication type

If encrypted authentication is disabled in your database, select DEFAULT.

If the connection to IBM DB2 databases is established by using the data encrypt security mechanism, select DATA_ENCRYPT .

Database credentials
User name

Enter the name of the user with permissions to connect and run SQL queries on the DB2 database. The user should have minimum SYSMON authority with DATAACCESS privileges.

Password
Confirm password
The password of the DB2 user.
Java collector settings
Java path
  • Enter the full path (do not use the short path format) to the JRE directory on the PATROL Agent host. The Java version must be 8 or later.
    For example:
    • Windows: C:\Program Files (x86)\Java\jre8
    • Unix\LINUX: /usr/java8_64
  • Alternatively, you can also use the $JAVA_HOME environment variable in this field. If you use the $JAVA_HOME variable, the Java location depends on the $JAVA_HOME you declare in you PATROL agent host.
  • If this field is left blank, the KM looks for the Java executable in the Patrol3\openjdk and Patrol3\jre64 locations.
JVM argumentsEnter the optional Java Virtual Machine (JVM) arguments for the DB2 Java collector.
Java OS credentials
User name

Enter the name of the OS JVM user (this user must exist where the PATROL Agent and DB2 KM are installed) with permission to run the Java process.

Note: If this field is left blank, the KM will use the user that is running the PATROL Agent.

Password
Confirm password
The password of the OS JVM user.
Monitoring data details
Monitoring level

Select the monitoring collection level for the IBM DB2 system.

  • Availability - Select this option to check the availability of instances, connections, and databases.
  • Full data monitoring - Select this option to collect all the monitored groups.
  • Custom data monitoring - Select this option to collect only the monitored groups selected from the custom data module types.
Monitoring categories

Select the monitor types for monitoring.

  • Applications - This group is responsible for collecting applications instances and parameters and displaying them under each partition of a database.
  • Buffer Pools - This group is responsible for collecting buffer pools instances and parameters and displaying them under each database’s partition.
  • Capacity - This group is responsible for collecting capacity parameters and displaying them under each partition of a database. 
  • HADR - This group is responsible for collecting HADR parameters and displaying them under each partition of HADR standby and primary databases.
  • Locks - This group is responsible for collecting lock parameters and displaying them under each partition of a database.
  • Logs - This group is responsible for collecting log parameters and displaying them under each partition of a database.
  • Performance - This group is responsible for collecting performance parameters and displaying them under each partition of a database.
  • Recovery - This group is responsible for collecting recovery parameters and displaying them under each partition of a database.
  • SQL - This group is responsible for collecting SQL parameters.
  • Tablespaces - This group is responsible for collecting table spaces instances and parameters and displaying them under each partition of a database.

Filter configuration by monitor types list

Click Add and filter the monitor types for monitoring. For more information, see Using filter configuration by monitor types.

Note

You can filter the monitor types at any instance level within the DB2 hierarchy.

Field
Description
Filtering monitor types

Select the filtering monitor type for monitoring:

  • DB2 Buffer Pool Container
  • DB2 Buffer Pool
  • DB2 Database Lock
  • DB2 Database Capacity
  • DB2 DB Partition
  • DB2 Applications Container
  • DB2 Application
  • DB2 Application's Agent
  • DB2 Table Spaces Container
  • DB2 Tablespace
  • DB2 Database Log
  • DB2 Database Sql
  • DB2 Database Recovery
  • DB2 Database Performance
  • DB2 Database Hadr
  • Custom SQL Queries
  • SQL Query
Filtering options

Based on the monitor types selected in the above field, select the filtering option:

  • None
  • Include
  • Exclude
Filtering instances from the selected monitor type

Based on the selection in the filtering options, specify the instances from the selected monitor type for monitoring. This field is regex enabled. Use comma (,) to define multiple instances for the specified monitor type.

Custom SQL query configuration list

Click Add and configure the custom SQL queries section.

Field
Description
SQL query name

Enter the name of the SQL query. This is an user-defined field.

Note

The name cannot include blank spaces or any of the following special characters: $ |?\"[]+=&*();!^<>:/
After you save the environment configuration, you cannot change the name without losing the environment's historical data. You can change the environment name by making a copy of the monitoring solution and then changing the environment name.

SQL query

Enter the SQL query that you want to execute in the database.

Note

The SQL query must not contain the semicolon (;).

For example: select TOTAL_CPUS from TABLE(SYSPROC.ENV_GET_SYS_INFO()) AS SYSTEMINFO

Collection time (min)Enter the SQL query collection time in minutes. The default collection cycle is 10 minutes.
Enable number of records annotationSelect this option to display the query result as an annotation on DB2 custom SQL query number of records metric.

Administration

Click Add and configure the administration details.

Field
Description
Logging

Select this option to enable debugging operations for configured environment. This enables the PSL and Java logging of the specified environment.

The PSL debug file of the environment is located under:

Patrol3/log/PSO_<DB type>^<environment name>-<Agent host>-<Agent port>.kmlog

For example: Patrol3/log/PSO_JDBC^DB2Env-IL-hhomndf-W1-3181.kmlog

The Java debug file of the environment is located under:

Patrol3/pso/logs/java/<DB type>^<environment>_<Agent port>_JavaCollector.log

For example: Patrol3/pso/logs/java/JDBC^DB2Env_3181_JavaCollector.log.0

Availability collection time (min)Enter the availability collection time in minutes for the DB2 JAVA collector. The default collection time is 1 minutes.
Data collection time (min)Enter the data collection time in minutes for the DB2 JAVA collector. The default collection time is 10 minutes.
Long running data collection queries threshold (sec)
Enter the threshold to monitor the data collection SQL queries that run longer than the number of seconds entered.
Device mappingSelect this option to enable device mapping for all hosts in this environment. If enabled, all the monitors gets created within a device according to the discovered host name of the monitored system. If disabled, all the monitors gets discovered under the PATROL Agent host device.

Disable monitoring configuration

Field
Description
Disable monitoring environmentSelect this option to disable the KM from discovering and monitoring the configured environment.

Global monitoring setting

Field

Description

LoggingSelect this option to enable main PSL debug logging for global configuration. The log file path:

Patrol3/log/PSO_JDBC_main-<Agent host>-<Agent port>.kmlog

Disable environments monitoring file location

Enter the absolute location of the disable monitoring file. The disable monitoring file should be configured on the PATROL Agent host.

Note

Once you remove the disable monitoring file from the monitoring system, the monitoring will be enabled.

Was this page helpful? Yes No Submitting... Thank you

Comments