DB2 linux plugin used depreceted view for data source since DB2 10.5

The background of this ticket was an automatic ticket from DB2 machine. Where the
SYSCATSPACE has automatically grow (expected behaviour) by DB2, but the max size of
the tablespace was not update in CheckMK (CRIT - 519.07 MB of 1 kB used, only -519.07
MB left (warn/crit at -1 MB/-1 MB)(!!), State: NORMAL, Type: SMS`).

This generated a message (as expected) but the original of the small 1kB
“TBSP_TOTAL_SIZE_KB” was unexpected. So we started digging in to the code.
The code showed that “sysibmadm.tbsp_utilization” is used for this information. This
view is deprecated since DB2 version 10.5 (source
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.rtn.doc/doc/r0023171.html).
The view that should be used is “MON_TBSP_UTILIZATION” (source
https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.sql.rtn.doc/doc/r0056516.html).

Maybe that the code should reflect this, for the quality of the source data.
For testing we used CheckMK Enterprise 1.6.0p5 and with DB2.linux plugin.

Thank you.

1 Like

We have the same problem. I"ve correct the plugins myself.

If you want I can share my version with you and you can test ist.

Regards

Anastasios

O that would great! I’m curious to test it out.

Hallo Stefan,

anbei mein modifiziertes mkp-Paket:
https://github.com/AnastasiosT/checkmk/blob/master/DB2-1.0.2.mkp

Ich habe folgende Plugins angepasst:

Agent-Files:

  • mk_db2.linux
  • db2_mem

Wenn du das mkp-Paket installierst, findest du die Agents in folgendem Pfad:
/omd/sites/site/local/share/check_mk/agents/plugins

Die Agent-Files kannst du dann auf deine Knoten verteilen

Checks:

  • db2_backup
  • db2_version
  • db2_sort_overflow
  • db2_tablespaces
  • db2_mem
  • db2_counters
  • db2_connections
  • db2_bp_hitratios
  • db2_logsizes

Viel Erfolg!