## Problem statement
The Instana DB2 sensor currently exposes only one Dynamic Focus keyword:
| Keyword | Data type | Description |
|------------------|-----------|--------------------|
| entity.db2.name | string | DB2 database name |
This makes it impossible to filter or group dashboard widgets by
**DB2 instance name** or **DB2 version** using Dynamic Focus queries.
In contrast, IBM MQ — a comparable middleware sensor — already provides rich
keyword support including queue manager name, platform, version and status:
| Keyword | Data type | Description |
|---------------------------|-----------|--------------------------------------|
| entity.ibmmq.qm.name | string | IBM MQ queue manager name |
| entity.ibmmq.qm.platform | string | IBM MQ queue manager platform |
| entity.ibmmq.qm.status | string | IBM MQ queue manager status |
| entity.ibmmq.qm.version | string | IBM MQ queue manager version |
## Proposed solution
Add the following Dynamic Focus keywords for the DB2 sensor, aligned with
the MQ pattern:
**DB2 Instance keywords:**
| Keyword (proposed) | Data type | Description |
|-------------------------------|-----------|----------------------------------------------------|
| entity.db2.instance.name | string | DB2 instance name |
| entity.db2.instance.uptime | number | DB2 instance uptime |
| entity.db2.instance.version | string | DB2 instance version |
| entity.db2.instance.platform | string | DB2 instance platform (AIX, Linux) |
| entity.db2.instance.status | string | DB2 instance status (ACTIVE, etc.) |
**DB2 HADR keywords:**
| Keyword (proposed) | Data type | Description |
|---------------------------------|-----------|------------------------------------------------------|
| entity.db2.hadr.role | string | HADR role — PRIMARY / STANDBY |
| entity.db2.hadr.state | string | HADR state — PEER / DISCONNECTED / REMOTE_CATCHUP |
| entity.db2.hadr.connectStatus | string | HADR connection status — CONNECTED / DISCONNECTED |
| entity.db2.hadr.syncMode | string | HADR sync mode — SYNC / NEARSYNC / ASYNC |
Note: `HADR connect Status` is currently exposed as a **numeric metric**
> (1 = CONNECTED, 0 = DISCONNECTED) but not as a Dynamic Focus keyword.
> `HADR state` (PEER / DISCONNECTED / REMOTE_CATCHUP) is visible in the
> Instana UI under "HADR general" but not exposed as a metric or keyword at all.
## Business value / use cases
1. **Dashboard filtering** — filter DB2 widgets by instance instead of
individual database name. A single instance hosts multiple databases;
today there is no way to group them at the instance level.
2. **Version visibility** — identify DB2 instances running outdated versions
across a large estate (200+ DB2 databases in our environment) without
navigating host by host.
3. **Multi-environment dashboards** — combined with `entity.db2.instance.platform`,
ops teams can build a single dashboard covering AIX and Linux DB2 instances
with proper filtering — currently not possible.
4. **Alert scoping** — create custom alerts scoped to a specific DB2 instance
(e.g., alert only on production instance `DB2INST1`) without relying on
host-level tags.
5. **DB2 Instance Uptime Dashboard** — `entity.db2.instance.uptime` would enable
a DB2-specific uptime dashboard identical in structure to the existing
**Server Uptime** dashboard already in production:
| Server Uptime (today) | DB2 Instance Uptime (proposed) |
|-------------------------|-------------------------------------|
| host.name | entity.db2.instance.name |
| host.os.name | entity.db2.instance.version |
| host.os.version | entity.db2.instance.platform |
| Server Uptime max | entity.db2.instance.uptime |
This would provide immediate visibility into DB2 instances that were
recently restarted — a critical indicator for production SRE teams.
6. **HADR state filtering** — `entity.db2.hadr.state` would allow filtering
dashboards to show only PRIMARY instances or instances in DISCONNECTED
state, enabling proactive HADR health monitoring at scale.
7. **Consistency with MQ** — IBM MQ and DB2 are both core IBM middleware
products. Parity in keyword coverage improves the monitoring experience
for teams managing both technologies on Instana.
## References
- Existing DB2 keyword:
https://www.ibm.com/docs/en/instana-observability?topic=instana-filtering-dynamic-focus#concept_1__title__1
- IBM MQ keywords (reference pattern):
https://www.ibm.com/docs/en/instana-observability?topic=instana-filtering-dynamic-focus#concept_1__title__1