Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_db2_health
1.0.3
2010-12-20
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios XI 2009R1
- Nagios Fusion 2010R1
123033
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!
$ check_db2_health
Please select a mode
Copyright (c) Gerhard Lausser
Check various parameters of DB2 databases
Usage:
check_db2_health [-v] [-t ] --hostname --port
--username= --password= --mode=
--database=
check_db2_health [-h | --help]
check_db2_health [-V | --version]
Options:
--connect
the connect string
--username
the db2 user
--password
the db2 user's password
--database
the database you want to check
--warning
the warning range
--critical
the critical range
--mode
the mode of the plugin. select one of the following keywords:
connection-time (Time to connect to the database)
connected-users (Number of currently connected users)
sql (any sql command returning a single number)
database-usage (Used space at the database level)
synchronous-read-percentage (Percentage of synchronous reads)
asynchronous-write-percentage (Percentage of asynchronous writes)
tablespace-usage (Used space at the tablespace level)
tablespace-free (Free space at the tablespace level)
bufferpool-hitratio (Hit ratio of a buffer pool)
bufferpool-data-hitratio (Hit ratio of a buffer pool (data pages only))
bufferpool-index-hitratio (Hit ratio of a buffer pool (indexes only))
index-usage (Percentage of selects that use an index)
stale-table-runstats (Tables whose statistics haven't been updated for a while)
deadlocks (Number of deadlocks per second)
lock-waits (Number of lock waits per second)
lock-waiting (Percentage of the time locks spend waiting)
sort-overflows (Number of sort overflows per second (Sorts needing temporary tables on disk))
sort-overflow-percentage (Percentage of sorts which result in an overflow)
log-utilization (Log utilization for a database)
last-backup (Time (in days) since the database was last backupped)
list-databases (convenience function which lists all databases)
list-tablespaces (convenience function which lists all tablespaces)
list-bufferpools (convenience function which lists all buffer pools)
--name
the name of the tablespace, datafile, wait event,
latch, enqueue, or sql statement depending on the mode.
--name2
if name is a sql statement, this statement would appear in
the output and the performance data. This can be ugly, so
name2 can be used to appear instead.
--regexp
if this parameter is used, name will be interpreted as a
regular expression.
--units
one of %, KB, MB, GB. This is used for a better output of mode=sql
You can use the plugin to execute arbitrary sql statements, like
check_db2_health --mode sql --name "select whatever from whatever" --warning 10 --critical 20
You can also extend the plugin with small pieces of perl code if you have very specific requirements in your company or if you want to monitor a certain application.
Reviews (3)
It checks some aspects of Db2, from a primitive perspective.
This script was not written by a dba, and it does not have the view from the administrative aspect of db2.
The code still have parts from Oracle, so this is not focused in Db2, but like porting.
The script does not support HADR, a minimum for a production environment.
It does not reuses connection, and it can be aggressive when monitoring multiple aspects.
The documentation does not include what grants or permissions are necessary to make it work.
It has a SQL replication part, that could be handy, it is not widely used. Instead, the script lacks mechanism to monitor other elements of Db2.
This script was not written by a dba, and it does not have the view from the administrative aspect of db2.
The code still have parts from Oracle, so this is not focused in Db2, but like porting.
The script does not support HADR, a minimum for a production environment.
It does not reuses connection, and it can be aggressive when monitoring multiple aspects.
The documentation does not include what grants or permissions are necessary to make it work.
It has a SQL replication part, that could be handy, it is not widely used. Instead, the script lacks mechanism to monitor other elements of Db2.
byejacobs, February 17, 2016
Script bombs out. Looks like it may be dependent on a different version of DBD::DB2. Doesn't like DBD::DB2::Server::Instance
bykennedto, January 9, 2015
Installed with no issues. Can use it to monitor all my DB2 servers. Only needed to install it on Nagios server to do this. For each host that has DB2 to monitor, just add free variables to allow connection to its DB2 server.