<!--startmeta
custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/go/plugin/ibm.d/modules/db2/README.md"
meta_yaml: "https://github.com/netdata/netdata/edit/master/src/go/plugin/ibm.d/modules/db2/metadata.yaml"
sidebar_label: "IBM DB2"
learn_status: "Published"
learn_rel_path: "Collecting Metrics/Collectors/Databases"
keywords: ['db2']
message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE COLLECTOR'S metadata.yaml FILE"
endmeta-->

# IBM DB2


<img src="https://netdata.cloud/img/ibm.svg" width="150"/>


Plugin: ibm.d.plugin
Module: db2

<img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />

## Overview

Monitors IBM DB2 databases using system catalog views and MON_GET_* table
functions to expose connections, locking, buffer pool efficiency, tablespace
capacity, and workload performance metrics.

Detailed charts are opt-in per object family through include/exclude lists.
Defaults focus on engine activity (system connections, core buffer pools,
catalog tablespaces). Matching uses glob patterns that can target schema or
application names, with include rules taking precedence over excludes.

When the number of matching objects exceeds the configured `max_*` limits,
the collector publishes deterministic top-N per-instance charts, aggregates
the remainder under `group="__other__"`, and logs a throttled warning so you
can refine selectors before cardinality runs away. Group charts (by schema,
application prefix, or buffer pool family) are always emitted so high-level
visibility is preserved even when individual instances are trimmed.


The collector connects to IBM DB2 and collects metrics via its monitoring interface.


This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.


### Default Behavior

#### Auto-Detection

This integration doesn't support auto-detection.

#### Limits

The default configuration for this integration does not impose any limits on data collection.

#### Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

## Setup


### Prerequisites

#### Enable monitoring interface

Ensure the IBM DB2 monitoring interface is accessible.



### Configuration

#### Options

Configuration options for the db2 collector.


<details open><summary>Config options</summary>



| Option | Description | Default | Required |
|:-----|:------------|:--------|:---------:|
| update_every | Data collection frequency. | 1 | no |
| endpoint | Connection endpoint. | dummy://localhost | no |


</details>



#### via File

The configuration file name for this integration is `ibm.d/db2.conf`.


You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).

```bash
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config ibm.d/db2.conf
```

##### Examples

###### Basic

Basic configuration example.

<details open><summary>Config</summary>

```yaml
jobs:
  - name: local
    endpoint: dummy://localhost

```
</details>



## Alerts

There are no alerts configured by default for this integration.



## Metrics

Metrics grouped by *scope*.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.




### Per bufferpool

These metrics refer to bufferpool instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| bufferpool | Bufferpool identifier |
| page_size | Page_size identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.bufferpool_instance_hit_ratio | Buffer Pool Hit Ratio | overall | percentage |
| db2.bufferpool_instance_detailed_hit_ratio | Buffer Pool Detailed Hit Ratios | data, index, xda, column | percentage |
| db2.bufferpool_instance_reads | Buffer Pool Reads | logical, physical | reads/s |
| db2.bufferpool_instance_data_reads | Buffer Pool Data Page Reads | logical, physical | reads/s |
| db2.bufferpool_instance_index_reads | Buffer Pool Index Page Reads | logical, physical | reads/s |
| db2.bufferpool_instance_pages | Buffer Pool Pages | used, total | pages |
| db2.bufferpool_instance_writes | Buffer Pool Writes | writes | writes/s |


### Per bufferpoolgroup

These metrics refer to bufferpoolgroup instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| group | Group identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.bufferpool_group_hit_ratio | Buffer Pool Group Hit Ratio | overall | percentage |
| db2.bufferpool_group_detailed_hit_ratio | Buffer Pool Group Detailed Hit Ratios | data, index, xda, column | percentage |
| db2.bufferpool_group_reads | Buffer Pool Group Reads | logical, physical | reads/s |
| db2.bufferpool_group_data_reads | Buffer Pool Group Data Reads | logical, physical | reads/s |
| db2.bufferpool_group_index_reads | Buffer Pool Group Index Reads | logical, physical | reads/s |
| db2.bufferpool_group_pages | Buffer Pool Group Pages | used, total | pages |
| db2.bufferpool_group_writes | Buffer Pool Group Writes | writes | writes/s |


### Per connection

These metrics refer to connection instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| application_id | Application_id identifier |
| application_name | Application_name identifier |
| client_hostname | Client_hostname identifier |
| client_ip | Client_ip identifier |
| client_user | Client_user identifier |
| state | State identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.connection_state | Connection State | state | state |
| db2.connection_activity | Connection Row Activity | read, written | rows/s |
| db2.connection_wait_time | Connection Wait Time | lock, log_disk, log_buffer, pool_read, pool_write, direct_read, direct_write, fcm_recv, fcm_send | milliseconds |
| db2.connection_processing_time | Connection Processing Time | routine, compile, section, commit, rollback | milliseconds |


### Per connectiongroup

These metrics refer to connectiongroup instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| group | Group identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.connection_group.count | Connection Group Count | count | connections |
| db2.connection_group.state | Connection Group State Sum | state | state |
| db2.connection_group.activity | Connection Group Row Activity | read, written | rows/s |
| db2.connection_group.wait_time | Connection Group Wait Time | lock, log_disk, log_buffer, pool_read, pool_write, direct_read, direct_write, fcm_recv, fcm_send | milliseconds |
| db2.connection_group.processing_time | Connection Group Processing Time | routine, compile, section, commit, rollback | milliseconds |


### Per database

These metrics refer to database instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| database | Database identifier |
| status | Status identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.database_instance_status | Database Status | status | status |
| db2.database_applications | Database Applications | applications | applications |


### Per index

These metrics refer to index instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| index | Index identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.index_usage | Index Usage | index, full | scans/s |


### Per indexgroup

These metrics refer to indexgroup instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| group | Group identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.index_group_usage | Index Group Usage | index, full | scans/s |


### Per memorypool

These metrics refer to memorypool instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| pool_type | Pool_type identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.memory_pool_usage | Memory Pool Usage | used | bytes |
| db2.memory_pool_hwm | Memory Pool High Water Mark | hwm | bytes |


### Per memoryset

These metrics refer to memoryset instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| host | Host identifier |
| database | Database identifier |
| set_type | Set_type identifier |
| member | Member identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.memory_set_usage | Memory Set Usage | used | bytes |
| db2.memory_set_committed | Memory Set Committed | committed | bytes |
| db2.memory_set_high_water_mark | Memory Set High Water Mark | hwm | bytes |
| db2.memory_set_additional_committed | Memory Set Additional Committed | additional | bytes |
| db2.memory_set_percent_used_hwm | Memory Set Percent Used vs HWM | used_hwm | percentage |


### Per prefetcher

These metrics refer to prefetcher instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| bufferpool | Bufferpool identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.prefetcher_prefetch_ratio | Prefetcher Prefetch Ratio | ratio | percentage |
| db2.prefetcher_cleaner_ratio | Prefetcher Cleaner Ratio | ratio | percentage |
| db2.prefetcher_physical_reads | Prefetcher Physical Reads | reads | reads/s |
| db2.prefetcher_async_reads | Prefetcher Asynchronous Reads | reads | reads/s |
| db2.prefetcher_wait_time | Prefetcher Wait Time | wait_time | milliseconds |
| db2.prefetcher_unread_pages | Prefetcher Unread Pages | unread | pages/s |


### Per IBM DB2 instance

These metrics refer to the entire monitored instance.

This scope has no labels.

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.service_health | Service Health Status | connection, database | status |
| db2.connections | Database Connections | total, active, executing, idle, max_allowed | connections |
| db2.locking | Database Locking | waits, timeouts, escalations | events/s |
| db2.deadlocks | Database Deadlocks | deadlocks | deadlocks/s |
| db2.lock_details | Lock Details | active, waiting_agents, memory_pages | locks |
| db2.lock_wait_time | Average Lock Wait Time | wait_time | milliseconds |
| db2.sorting | Database Sorting | sorts, overflows | sorts/s |
| db2.row_activity | Row Activity | read, returned, modified | rows/s |
| db2.bufferpool_hit_ratio | Buffer Pool Hit Ratio | hits, misses | percentage |
| db2.bufferpool_data_hit_ratio | Buffer Pool Data Page Hit Ratio | hits, misses | percentage |
| db2.bufferpool_index_hit_ratio | Buffer Pool Index Page Hit Ratio | hits, misses | percentage |
| db2.bufferpool_xda_hit_ratio | Buffer Pool XDA Page Hit Ratio | hits, misses | percentage |
| db2.bufferpool_column_hit_ratio | Buffer Pool Column Page Hit Ratio | hits, misses | percentage |
| db2.bufferpool_reads | Buffer Pool Reads | logical, physical | reads/s |
| db2.bufferpool_data_reads | Buffer Pool Data Page Reads | logical, physical | reads/s |
| db2.bufferpool_index_reads | Buffer Pool Index Page Reads | logical, physical | reads/s |
| db2.bufferpool_xda_reads | Buffer Pool XDA Page Reads | logical, physical | reads/s |
| db2.bufferpool_column_reads | Buffer Pool Column Page Reads | logical, physical | reads/s |
| db2.bufferpool_writes | Buffer Pool Writes | writes | writes/s |
| db2.log_space | Log Space Usage | used, available | bytes |
| db2.log_utilization | Log Space Utilization | utilization | percentage |
| db2.log_io | Log I/O Operations | reads, writes | operations/s |
| db2.log_operations | Log Operations | commits, rollbacks, reads, writes | operations/s |
| db2.log_timing | Log Operation Times | avg_commit, avg_read, avg_write | milliseconds |
| db2.log_buffer_events | Log Buffer Full Events | buffer_full | events/s |
| db2.long_running_queries | Long Running Queries | total, warning, critical | queries |
| db2.backup_status | Last Backup Status | status | status |
| db2.backup_age | Time Since Last Backup | full, incremental | hours |
| db2.federation_connections | Federated Connections | active, idle | connections |
| db2.federation_operations | Federated Operations | rows_read, selects, waits | operations/s |
| db2.database_status | Current Database Status | active, inactive | status |
| db2.database_count | Database Count | active, inactive | databases |
| db2.cpu_usage | CPU Usage (100% = 1 CPU core) | user, system, idle, iowait | percentage |
| db2.active_connections | Active Connections | active, total | connections |
| db2.memory_usage | Memory Usage | database, instance, bufferpool, shared_sort | MiB |
| db2.sql_statements | SQL Statements | selects, modifications | statements/s |
| db2.transaction_activity | Transaction Activity | committed, aborted | transactions/s |
| db2.time_spent | Average Operation Times | direct_read, direct_write, pool_read, pool_write | milliseconds |


### Per table

These metrics refer to table instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| table | Table identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.table_size | Table Size | data, index, long_obj | bytes |
| db2.table_activity | Table Activity | read, written | rows/s |


### Per tablegroup

These metrics refer to tablegroup instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| group | Group identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.table_group_size | Table Group Size | data, index, long_obj | bytes |
| db2.table_group_activity | Table Group Activity | read, written | rows/s |


### Per tableio

These metrics refer to tableio instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| table | Table identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.table_io_scans | Table Scans | scans | scans/s |
| db2.table_io_rows | Table Row Operations | read | rows/s |
| db2.table_io_activity | Table DML Activity | inserts, updates, deletes | operations/s |
| db2.table_io_overflow | Table Overflow Accesses | overflow | accesses/s |


### Per tablespace

These metrics refer to tablespace instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| tablespace | Tablespace identifier |
| type | Type identifier |
| content_type | Content_type identifier |
| state | State identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.tablespace_usage | Tablespace Usage | used | percentage |
| db2.tablespace_size | Tablespace Size | used, free | bytes |
| db2.tablespace_usable_size | Tablespace Usable Size | total, usable | bytes |
| db2.tablespace_state | Tablespace State | state | state |


### Per tablespacegroup

These metrics refer to tablespacegroup instances.

Labels:

| Label      | Description     |
|:-----------|:----------------|
| group | Group identifier |

Metrics:

| Metric | Description | Dimensions | Unit |
|:------|:------------|:----------|:----|
| db2.tablespace_group_usage | Tablespace Group Usage | used | percentage |
| db2.tablespace_group_size | Tablespace Group Size | used, free | bytes |
| db2.tablespace_group_usable_size | Tablespace Group Usable Size | total, usable | bytes |
| db2.tablespace_group_state | Tablespace Group State | state | state |
