Home Directory Plugins Databases DB2 Monitor DB2 with Nagios

Search Exchange

Search All Sites

Nagios Log Server Now Available - Download Now

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Monitor DB2 with Nagios

Bookmark and Share

Don't miss your chance to attend the 2015 Nagios World conference!

Don't miss your chance to attend the 2015 Nagios World Conference, Sep 28-30th. Informative Sessions, Networking, Food and Cocktails! Visit conference.nagios.com for more information or to register.


Current Version
Beta
Last Release Date
2014-09-20
Compatible With
  • Nagios 3.x
Owner
E-mail
License
Apache
Hits
33163
Set of Bash scripts to monitor DB2 database by checking different elements of this RDBM. Several criteria of the instances and databases can be analyzed with these scripts.

All scripts return Performance Data to see the evolution of the values across the time.
This set of scripts is in continuous development, thus new scripts are being developed and new ones have been planned. If you want to share your own modifications, you can share it in GitHub (Pull request).

The whole documentation is on the Wiki: [https://github.com/angoca/monitor-db2-with-nagios/wiki]
Example of usage, output and performance data are also availables: [https://github.com/angoca/monitor-db2-with-nagios/wiki/Scripts]

For the moment, you can monitor:

* Quantity of connexions, filtered by many criteria (machines, users) and showing their status.
* Checks if a connection to the database can be established.
* Checks the database size. Based on the Storage management utility.
* Checks the HADR status, by analyzing peer status and calculating the difference between primary et standby (logs et pages)
* Checks if the instance is active.
* Keeps a history of last backups (full, delta, incremental) and could throw an alert if the backup is too old.
* Checks the locks looking for long term lock waits, returning with process is holding the locks.
* Checks the log consumption per day. Allows you identify the most expensive transaction measured by logs produced.
* Log usage, that allows you identify how many primary and secondary logs are being used during the day.
* Open files by the db2sysc process.
* Performance of the IO Cleaners by identifying the percentage of Bad Page Cleaner Triggers (PBPDT).
* Quantity of message in the db2diag.log. Useful to detect alerts that are not part of any output.
* Tablespace: Use and state (normal, backup, etc.)
* Utilities: Allows you to identify which utilities could impact the normal db usage.

The scripts have been adapted to be used with Check_MK (The output was changed.)

The project is hosted in the GitHub forge. You can improve the provided scripts, or create your own based on these scripts. If you want to contribute to the project with your own scripts, your code is welcome.
Reviews (1)
bySetti, February 2, 2015
1 of 1 people found this review helpful
I found it very useful, but found some errors:
in check_hadr_status, line n. 290 is wrong: COMMAND_HADR="db2pd -db wfscpd -hadr" should be:
COMMAND_HADR="db2pd -db ${DATABASE_NAME} -hadr".
On all plugins, you don't return the name of the database, but if you want to run many checks at the same time with check_by_ssh plugin, you will absolutley need to know which control gives which result.
To do so, i modified line 360 adding ${DATABASE_NAME} before ${OUTPUT}, but i think you can find a better solution to that.
Owner's reply

Hi @Setti, thank you for the feedback. I have not realized the problem you noticed.
I have corrected the database name problem.
For the other case, I do not know why do you need the database name. You are passing this value as parameter, with NRPE or with SSH execution. If you want to discuss more about this issue, please create a ticket at: https://github.com/angoca/monitor-db2-with-nagios/issues
Finally, I am working in a new set of Nagios plugins for DB2: https://github.com/angoca/db2-jnrpe This has a better structure, historical information and less overhead.