# DB2 # Introduction **The purpose of this plugin is to monitor DB2 databases**, through queries that will extract information about data that is key to knowing the performance and status of the databases, such as the number of connections, cache, database size, percentage of log used and many more stats. These data will be reflected in PandoraFMS, in modules that will provide the statistical value, within an agent that will represent each database. This plugin is developed to be used with Pandora FMS Discovery, so unlike other plugins it does not generate agents by XML, but rather everything discovered is returned in the JSON output of the plugin. # Prerrequisites This plugin makes remote connections to the databases to be monitored, so it is necessary to ensure connectivity between the Pandora FMS server and said databases. # Parameters and configuration **Parameters**
--conf | Path to the configuration file. |
--target\_databases | Path to the configuration file containing the database targets. |
--target\_agents | Path to the configuration file containing the agent targets. |
--custom\_queries | Path to the configuration file containing custom queries. |
AGENT\_WAIT\_TIME\_PERCENT | Represents the percentage of time that DB2 agents are waiting for some activity, such as locks or external requests. |
APP\_RQSTS\_COMPLETED\_TOTAL | Indicates the total number of application requests completed in the DB2 database. |
AVG\_RQST\_CPU\_TIME | Represents the average CPU time used by each application request on the database. |
CF\_WAIT\_TIME\_PERCENT | Shows the percentage of time that DB2 agents are waiting for shared resources on multi-node systems. |
IO\_WAIT\_TIME\_PERCENT | Indicates the percentage of time that DB2 agents are waiting for input/output (I/O) operations. |
LOCK\_WAIT\_TIME\_PERCENT | Represents the percentage of time that DB2 agents are waiting for resource locks. |
NETWORK\_WAIT\_TIME\_PERCENT | Shows the percentage of time that DB2 agents are waiting for network operations. |
RECLAIM\_WAIT\_TIME\_PERCENT | Indicates the percentage of time that DB2 agents are waiting for resource releases. |
ROUTINE\_TIME\_RQST\_PERCENT | Represents the percentage of time used by stored routines (stored procedures, functions, etc.) in each application request. |
RQST\_WAIT\_TIME\_PERCENT | Shows the percentage of time that application requests are waiting to be executed by DB2 agents. |
TOTAL\_BP\_HIT\_RATIO\_PERCENT | Indicates the percentage of hits in the buffer cache (buffer pool), which represents the efficiency in accessing data in memory. |
TOTAL\_BP\_HIT\_RATIO\_PERCENT | Represents the percentage of time used by transaction completion operations in each application request. |
Log utilization percent | Percentage of log used in Kilobytes |
Database size | Database size in Megabytes |
Active connections | Number of active connections |
cache hit ratio <buffer cache name of each row> | Cache hit ratio for each BP\_NAME. By combining the cache hit ratio with "bp\_name" (buffer cache name), you can evaluate the buffer cache performance for each of the existing caches in the DB2 database. You can monitor and compare the cache hit ratio for each buffer cache individually, allowing you to identify which buffer caches are operating most efficiently and which may require adjustments. |