Search Exchange

Search All Sites

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

Directory Tree

check_db2

Rating
1 vote
Favoured:
0
Current Version
1.0
Last Release Date
2013-06-25
Compatible With
  • Nagios 3.x
License
GPL
Hits
41801
Files:
FileDescription
check_db2Script for doing the monitoring work
db2.check.cC file for executing the script with suid
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
db2_check is the first version for checking db2 BP,TS, and transaction log utilization on all instances and all databases except for the ones that are manually configured to be ignored.

Requires root permissions, so I added db2.check.c that is a wrapper.
I'm no db2 expert, but I'm an IBM WebSphere Portal administrator for a large environment (well mid 50-100 hosts) and I had a lot of PMRs solved by looking into db2.
This script is helping me track db2 instances and dbs, further functionality will come with further problems, so I hope that further functionality comes from other community members ;-)

This script is intended to be used with some nice graphing software (like nagiosgraph) and be executed by nrpe.

File 1 (check_db2) is the script that runs all the functionality, it will require:
* root permission
* some space on /tmp
* some spaces on /var

As i know is MAD to execute nrpe with root permissions, I attached File 2 (db2.check.c). This file must be owned by root, must be readable and executable by the nrpe/nagios/whatever user and have the suid flat (+s) this will overcome the need of the shell to be executed by the root user.

You can change the path of the script (on db2.check.c) but check_db2 is intended to be on /usr/local/nagios.

Compiling db2.check.c is as easy as:
gcc db2.check.c -o db2.check
Reviews (1)
byangoca, July 3, 2013
I have seen the code, and it is very interesting, because it captures information from many different DB2 aspects at the same time.

However, it uses root in order to be executed, and it is not always possible. DB2 relies in OS security, and there can be other ways to get the information. No need to do 'su - instUser'

Very interesting queries, however, you need at least DB2 9.7 FP 6