IBM DB2 Performance Monitoring

Drill down into the performance of your DB2 database by getting to know bufferpool, transaction, log utilization stats and more.

Prerequisites

Install the IBM DB2 database server monitoring plugin to track the availability and performance of DB2 servers.

  • Download and install the Site24x7 server monitoring agent (Linux | Windows) in the server where you plan to run the plugin.
  • Ensure you have Python 3 or a higher version installed in your server.
  • Ensure you have the ibm_db module for Python installed in your server.
    If it is not installed, execute the following command on your server to install it:
    pip install ibm_db
  • Provide the DBADM authority role to the IBM DB2 user to access performance metrics from the database.

Install the IBM DB2 custom database query plugin and monitor SQL queries to track business-critical KPIs from your IBM DB2 database tables. The plugin executes a given query and displays the result as performance data. The column name will be displayed as the metric name and the corresponding value of the column will be displayed as the metric value.

  • Download and install the Site24x7 server monitoring agent (Linux | Windows) in the server where you plan to run the plugin.
  • Ensure you have Python 3 or a higher version installed in your server.
  • Ensure you have the ibm_db module for Python installed in your server.
    If it is not installed, execute the following command on your server to install it:
    pip install ibm_db

Install the IBM DB2 tablespace plugin to monitor DB2 database tablespaces.

  • Download and install the Site24x7 server monitoring agent (Linux | Windows) in the server where you plan to run the plugin.
  • Ensure you have Python 3 or a higher version installed in your server.
  • Ensure you have the ibm_db module for Python installed in your server.
    If it is not installed, execute the following command on your server to install it:
    pip install ibm_db
  • Provide the DBADM authority role to the IBM DB2 user to access performance metrics from the database.

Plugin installation

  • Create a folder named ibmdb2.
  • Download the ibmdb2.py and the ibmdb2.cfg files from our GitHub repository and place them in the ibmdb2 folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2/ibmdb2.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2/ibmdb2.cfg
  • For Linux servers, follow the steps in this article to update the Python path in the ibmdb2.py script.
  • To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding values.
    python3 ibmdb2.py --host <hostname> --port <port no> --username <username> --password <password> --sample_db <db name>
  • Add the applicable configurations in the ibmdb2.cfg file.
    [ibm_db_2]
    host = "<hostname>"
    port = "<port>"
    username = "<username>"
    password = "<password>"
    sample_db = "<sample_db>"
  • Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
  • Move the ibmdb2 folder to the Site24x7 server monitoring plugin directory.

    For Linux: /opt/site24x7/monagent/plugins/

    For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display the performance data in Site24x7.
To view the plugin monitor and associated performance charts:
  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.
  • Create a folder named ibmdb2_custom_query.
  • Download the ibmdb2_custom_query.py and the ibmdb2_custom_query.cfg files from our GitHub repository and place them in the ibmdb2_custom_query folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2_custom_query/ibmdb2_custom_query.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2_custom_query/ibmdb2_custom_query.cfg
  • To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding values.
    python3 ibmdb2_custom_query.py --host <hostname> --port <port no> --username <username> --password <password> --sample_db <db name> --query <db2 query>
  • Add the applicable configurations in the ibmdb2_custom_query.cfg file.
    [ibm_db_2]
    host = "<hostname>"
    port = "<port>"
    username = "<username>"
    password = "<password>"
    sample_db = "<sample_db>"
    query = "<DB2 Query>"
  • Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
  • Move the ibmdb2_custom_query folder to the Site24x7 server monitoring plugin directory.

    For Linux: /opt/site24x7/monagent/plugins/

    For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display the performance data in Site24x7.
To view the plugin monitor and associated performance charts:
  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.
  • Create a folder named ibmdb2_tablespace.
  • Download the ibmdb2_tablespace.py and the ibmdb2_tablespace.cfg files from our GitHub repository and place them in the ibmdb2_tablespace folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2/ibmdb2_tablespace/ibmdb2_tablespace.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/ibmdb2/ibmdb2_tablespace/ibmdb2_tablespace.cfg
  • For Linux servers, follow the steps in this article to update the Python path in the ibmdb2_tablespace.py script.
  • To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding values.
    python3 ibmdb2_tablespace.py --host <hostname> --port <port no> --username <username> --password <password> --sample_db <db name> --tbsp_name <tablespace name>
  • Add the applicable configurations in the ibmdb2_tablespace.cfg file.
    [ibm_db_2]
    host = "<hostname>"
    port = "<port>"
    username = "<username>"
    password = "<password>"
    sample_db = "<sample_db>"
    tbsp_name = "<tablespace name>"
  • Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
  • Move the ibmdb2_tablespace folder to the Site24x7 server monitoring plugin directory.

    For Linux: /opt/site24x7/monagent/plugins/

    For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display the performance data in Site24x7.
To view the plugin monitor and associated performance charts:
  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.

Related plugins

  • ActiveMQ plugin - Monitor performance metrics of your Apache ActiveMQ instances
  • GlassFish plugin - Monitor performance metrics of your GlassFish servers
  • Kafka plugin - Analyze performance of your Apache Kafka server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes
Looking for assistance? We’re here to help!

Want to learn more?

  • Personalized product demo
  • Proof of concept for set up
  • 30-day, unlimited, free trial
Request a Demo

Interested in our services?

  • 24/5 customer support
  • Flexible and competitive pricing
  • Better ROI
Get quote