IBM DB2 for LUW (remote monitoring) extension

  • Latest Dynatrace
  • Extension
  • Published Oct 27, 2025

Remotely collect monitoring metrics from your DB2 databases.

Get started

Requirements

Connectivity

Extension is run on an ActiveGate group. Make sure the group selected in monitoring configuration contains ActiveGates that can reach the DB2 instances defined in the monitoring configuration.

DB2 user

The DB2 user used by the extension must have read access to monitoring table functions and administrative views:

  • EXECUTE privilege on the monitoring table fuctions:
    • MON_GET_DATABASE
    • MON_GET_INSTANCE
    • MON_GET_TRANSACTION_LOG
    • MON_GET_TABLESPACE
    • MON_GET_CONNECTION
    • MON_GET_HADR
    • ENV_GET_SYSTEM_RESOURCES
  • SELECT privilege on the following administrative views:
    • ENV_INST_INFO
    • MON_CURRENT_SQL

As an alternative to the above 'least-privilege' approach any of the following authorities will provide the required access as well:

  • DATAACCESS authority
  • DBADM authority
  • SQLADM authority

As part of the connection process of the SQL datasource, the user must also have the privilege to perform the SELECT opertation on the SYSIBM.SYSDUMMY1 catalog table.

If the database was created with the RESTRICTIVE option you will also need to provide the user with the USAGE privilege on an enabled workload. See here for details.

Compatibility information

IBM supported versions of IBM DB2 for Linux, UNIX, and Windows (LUW) running on AIX, HP-UX, Linux, Solaris, or Windows are supported. DB2 for IBM i is not supported.

Refer to the IBM documentation for details on DB2 end of support dates.

Activation and setup

  1. Find the extension in Dynatrace Hub and add it to your environment.
  2. Add a monitoring configuration for every DB2 instance you'd like to monitor

Instance alias

Starting with version 2.2.0 you are able to define an alias per DB2 endpoint. This name will be used in the name of the DB2 instance and as a component in all of it's child entities. This can be used to provide a more meaningful or shorter name to entities. The name will apply to the existing entities if added to an existing configuration so you won't need to redo any configs.

Details

Logs ingested

If you enable the 'top_current_sql' feature set, a query to the MON_CURRENT_SQL view will be made once every 5 minutes and the top 50 currently executing statements (based on elapsed time) will be ingested as log records. Note that currently executing means that a statement must be currently executing at the time this query is run for it to be included. This can give you insight into long running queries in your databases. These logs will be associated with the DB2 Database Instance entity.

Note that as this can result in large amounts of log records being ingested it should be used with caution.

Metrics collected

Review the feature set details to see which metrics are collected.

Calculated metrics

Calculated metrics (prefixed with 'func:') are calculated on the Dynatrace cluster side based on the metrics collected through the extension. Some calculated metrics require metrics from certain feature sets, so if you do not have all feature sets enabled you may encounter errors when attempting to chart them.

  • func:db2.app_transactions (database) - Number of application transactions executed. Commits and rollbacks.
  • func:db2.table_reads_per_returned_rows_ratio (database) - Cache usage during transaction reads.
  • func:db2.lock_wait_per_transaction_ratio (database) - Lock wait time per transaction.
  • func:db2.lock_fails_per_transaction_ratio (database) - Lock fails (deadlocks and lock timeouts) per transaction.
  • func:db2.log_flush_time_per_transaction_ratio (database, transaction_log) - The time an agent waits for log records to be flushed to disk.
  • func:db2.pool_index_page_hits (database) - Index pages usage.
  • func:db2.pool_data_page_hits (database) - Data pages usage.
  • func:db2.pool_xda_page_hits (database) - XML storage object (XDA) pages usage.
  • func:db2.pool_physical_reads_per_transaction_ratio (database) - Pool physical reads per transaction.
  • func:db2.pool_physical_writes_per_transaction_ratio (database) - Pool physical writes per transaction.
  • func:db2.pool_dirty_steal_triggers_per_transaction_ratio (database) - Number of ‘dirty steal’ triggers per transaction.
  • func:db2.sorts_per_transaction_ratio (database) - The amount of sort operations per transaction.
  • func:db2.all_transactions.count (database) - All transactions including internally initiated commits and rollbacks.
  • func:db2.response_time (database) - CPU and wait time divided by commits and rollbacks.
  • func:db2.tbsp_page_utilization (tablespace) - Percentage of tablespace in use by tablespace.
  • func:db2.total_log_utilization (transaction_log) - Percentage of transaction log space used.

Metric event

One metric event for alerting configuration is included: 'DB2 - Instance Unavailable'. After you activate the extension, go to Settings > Anomaly detection > Metric events and enable it to have availability events created on the database instance entity if no data is collected for 3 out of 5 minute intervals.

Licensing and cost

There is no charge for obtaining the extension, only for the data that the extension ingests. The details of license consumption will depend on which licensing model you are using. This will either be Dynatrace classic licensing or the Dynatrace Platform Subscription (DPS) model.

Metrics

License consumption is based on the number of metric data points ingested. The following formula will provide approximate annual data points ingested assuming all feature sets are enabled.

(10 + (49 * members) + (3 * member tablespaces)) * 60 minutes * 24 hours * 365 days data points per year

Metrics in classic licensing

In the classic licensing model, metric ingestion will consume Davis Data Units (DDUs) at the rate of .001 DDUs per metric data point.

Multiply the above formula for annual data points by .001 to estimate annual DDU usage.

Logs

If you use the 'top_current_sql' feature set you can ingest up to 50 log records per monitored instance every 5 minutes. Exact values will depend on currently executing queries at the time the extension runs.

License consumption is based on the volume of data (discussed here).

Log in classic licensing

In classic licensing DDUs are consumed at the rate of 0.0005 DDUs per record.

FAQ

What if I need to connect using SSL?

The DB2 data source supports SSL connections as of ActiveGate version 1.269. Monitoring configurations will need to be updated to enable SSL and connect to the SSL port.

Feature sets

When activating your extension using monitoring configuration, you can limit monitoring to one of the feature sets. To work properly the extension has to collect at least one metric after the activation.

In highly segmented networks, feature sets can reflect the segments of your environment. Then, when you create a monitoring configuration, you can select a feature set and a corresponding ActiveGate group that can connect to this particular segment.

All metrics that aren't categorized into any feature set are considered to be the default and are always reported.

A metric inherits the feature set of a subgroup, which in turn inherits the feature set of a group. Also, the feature set defined on the metric level overrides the feature set defined on the subgroup level, which in turn overrides the feature set defined on the group level.

transactionLog
Metric nameMetric keyDescription
Log write timedb2.log_write_time.countThe total elapsed time spent by the logger writing log data to the disk.
Transaction log useddb2.total_log_usedThe total amount of active log space currently used in the database.
Transaction log availabledb2.total_log_availableThe amount of active log space in the database that is not being used by uncommitted transactions.
In doubt transactionsdb2.num_indoubt_transactionsThe number of outstanding indoubt transactions in the database.
database
Metric nameMetric keyDescription
Apps currently connecteddb2.appl_cur_consIndicates the number of applications that are currently connected to the database.
Dynamic SQL statementsdb2.dynamic_sql_stmts.countThe number of dynamic SQL statements that were attempted.
Failed SQL statementsdb2.failed_sql_stmts.countThe number of SQL statements that were attempted, but failed.
Total app commitsdb2.total_app_commits.countTotal number of commit statements issued by the client application.
Internal commitsdb2.int_commits.countThe total number of commits initiated internally by the database manager.
App rollbacksdb2.total_app_rollbacks.countTotal number of rollback statements issued by the client application.
Internal rollbacksdb2.int_rollbacks.countThe total number of rollbacks initiated internally by the database manager.
CPU timedb2.total_cpu_time.countThe total amount of CPU time used while within the database system. Represents total of both user and system CPU time.
Wait timedb2.total_wait_time.countThe total time spent waiting within the database server.
Request timedb2.total_rqst_time.countThe total amount of time spent working on requests.
Rows returneddb2.rows_returned.countThe number of rows that have been selected and returned to the application.
Rows readdb2.rows_read.countThe number of rows read from the tables.
Rows updateddb2.rows_updated.countThis is the number of row updates attempted.
Rows deleteddb2.rows_deleted.countThis is the number of row deletions attempted.
Rows inserteddb2.rows_inserted.countThe number of row insertions attempted.
Lock wait timedb2.lock_wait_time.countThe total elapsed time spent waiting for locks.
Deadlocksdb2.deadlocks.countThe total number of deadlocks that have occurred.
Lock timeoutsdb2.lock_timeouts.countThe number of times that a request to lock an object timed out instead of being granted.
Buffer pool data writesdb2.pool_data_writes.countThe number of times a buffer pool data page was physically written to disk.
Buffer pool index writesdb2.pool_index_writes.countIndicates the number of times a buffer pool index page was physically written to disk.
Buffer pool XDA writesdb2.pool_xda_writes.countIndicates the number of times a buffer pool data page for an XML storage object (XDA) was physically written to disk.
Local buffer pool index pages founddb2.pool_index_lbp_pages_found.countIndicates the number of index pages which have been synchronously read by agents and asynchronously read by prefetchers from the local buffer pool (logical) for regular and large table spaces.
Async local buffer pool index pages founddb2.pool_async_index_lbp_pages_found.countThe number of times an index page was present in the local buffer pool when a prefetcher attempted to access it.
Buffer pool index logical readsdb2.pool_index_l_reads.countIndicates the number of index pages which have been synchronously read by agents from the buffer pool (logical) for regular and large table spaces.
Buffer pool temp index logical readsdb2.pool_temp_index_l_reads.countIndicates the number of index pages which have been requested from the buffer pool (logical) for temporary table spaces.
Local buffer pool data pages founddb2.pool_data_lbp_pages_found.countIndicates the number of data pages which have been synchronously read by agents and asynchronously read by prefetchers from the local buffer pool (logical) for regular and large table spaces.
Async local buffer pool data pages founddb2.pool_async_data_lbp_pages_found.countThe number of times a data page was present in the local buffer pool when a prefetcher attempted to access it.
Buffer pool data logical readsdb2.pool_data_l_reads.countIndicates the number of data pages which have been synchronously read by agents from the buffer pool (logical) for regular and large table spaces.
Buffer pool temp data logical readsdb2.pool_temp_data_l_reads.countIndicates the number of data pages which have been requested from the buffer pool (logical) for temporary table spaces.
Local buffer pool XDA pages founddb2.pool_xda_lbp_pages_found.countIndicates the number of data pages for an XML storage object (XDA) which have been synchronously read by agents and asynchronously read by prefetchers from the local buffer pool (logical) for regular and large table spaces.
Async local buffer pool XDA pages founddb2.pool_async_xda_lbp_pages_found.countThe number of times a data page for an XML storage object (XDA) was requested by a prefetcher from and found in the local buffer pool.
Buffer pool XDA logical readsdb2.pool_xda_l_reads.countIndicates the number of data pages for XML storage objects (XDAs) which have been synchronously read by agents from the buffer pool (logical) for regular and large table spaces.
Buffer pool temp XDA logical readsdb2.pool_temp_xda_l_reads.countIndicates the number of pages for XML storage object (XDA) data which have been requested from the buffer pool (logical) for temporary table spaces.
Buffer pool data physical readsdb2.pool_data_p_reads.countIndicates the number of data pages which have been synchronously read by agents and asynchronously read by prefetchers from the table space containers (physical) for regular and large table spaces.
Buffer pool index physical readsdb2.pool_index_p_reads.countIndicates the number of index pages which have been synchronously read by agents and asynchronously read by prefetchers from the table space containers (physical) for regular and large table spaces.
Buffer pool XDA physical readsdb2.pool_xda_p_reads.countIndicates the number of data pages for XML storage objects (XDAs) which have been synchronously read by agents and asynchronously read by prefetchers from the table space containers (physical) for regular and large table spaces.
Buffer pool temp data physical readsdb2.pool_temp_data_p_reads.countIndicates the number of data pages read in from the table space containers (physical) for temporary table spaces.
Buffer pool temp index physical readsdb2.pool_temp_index_p_reads.countIndicates the number of index pages read in from the table space containers (physical) for temporary table spaces.
Buffer pool temp XDA physical readsdb2.pool_temp_xda_p_reads.countIndicates the number of pages for XML storage object (XDA) data read in from the table space containers (physical) for temporary table spaces.
Buffer pool victim page cleaners triggereddb2.pool_drty_pg_steal_clns.countThe number of times a page cleaner was invoked because a synchronous write was needed during the victim buffer replacement for the database.
Total sortsdb2.total_sorts.countThe total number of sorts that have been executed.
Time since backupdb2.time_since_backupTime since last backup was completed
Backup timedb2.backup_time.countThe elapsed time that was spent doing online backups
Online backupsdb2.total_backupsTotal number of online backups
hadr
Metric nameMetric keyDescription
HADR connect statusdb2.hadr_connect_statusThe current high availability disaster recovery (HADR) connection status of the database.
HADR statedb2.hadr_stateThe current high availability disaster recovery (HADR) state of the database.
HADR log gapdb2.hadr_log_gapThe recent average of the gap between the PRIMARY_LOG_POS value and STANDBY_LOG_POS value (how far the standby is behind the primary).
Standby tablespace errordb2.hadr_standby_tablespace_errorReports 1 if HADR_FLAGS indicate the standby database has a tablespace in an invalid error state. If this state occurs during a database upgrade and if the problem is not resolved before the upgrade completes, the table spaces that are in error will not be recoverable.
tablespace
Metric nameMetric keyDescription
Tablespace total pagesdb2.tbsp_total_pagesTotal number of pages in a table space.
Tablespace used pagesdb2.tbsp_used_pagesThe total number of pages that are currently used (not free) in a table space.
Tablespace statedb2.tbsp_stateThe current state of a table space.
connections
Metric nameMetric keyDescription
Active connectionsdb2.active_connectionsCurrent active connections to database.
topCurrentSql
Metric nameMetric keyDescription
default
Metric nameMetric keyDescription
Availabilitydb2.availabilityAvailability based on ability of extension to connect to DB2 instance (100% reported on success, no data on failure).
CPU usagedb2.cpu_usage_totalThe overall processor usage on this host including kernel processing time, expressed as a percentage.
Memory freedb2.memory_freeThe total amount of physical memory on this host that is not allocated to a running process.
Memory totaldb2.memory_totalThe total amount of physical memory on this host.
Memory usagedb2.memory_usageThe total amount of physical memory on this host allocated to a running process as a percentage.
Database manager instance statusdb2.db2_statusThe current status of the instance of the database manager.
Member statusdb2.db_statusThe current status of the database member.
Related tags
DatabaseSQLDatabaseIBMApplication Observability