Oracle

check_db_record_count

Description:

nagios plugin to check if a query returns a specific count based on a sql query within a specific timeframe (ksh script)

Current Version

Last Release Date

May 28, 2009

Compatible With


Project Files
Project Notes
nagios plugin to check if a query returns a specific count based on a sql query within a specific timeframe author: Sergei Haramundanis 24-Oct-2006 usage: check_db_record_count access_file check_from_time check_to_time query_file max_count Description: This plugin will check if a query exceeds a specific count (max_count) at a specific timeframe specified by check_from_time and check_to_time (in HHMM format) by executing the specified sql query in the query_file This plugin requires oracle sqlplus (see definition of ORACLE_HOME, PATH and LD_LIBRARY_PATH further on in this script, you may need to change them) all fields are required contents of access_file must contain database connection information in the following format: USERNAME username PASSWORD password CONNECTION_STRING connection_string contents of query_file must contain sql query information in the following format: SQL_QUERY specific_sql_query these are to be used by sqlplus to login to the database and execute the appropriate sql query Output: During any run of the plugin, the value returned will be as follows: if the current time is within the specified timeframe, it will execute the specific sql query if max_count is exceeded it will return a CRITICAL state with the message: [CRITICAL] detected n records (max_count # exceeded) if max_count is not exceeded it will return an OK state with the message: [OK] detected n record(s) (max_count # not exceeded) if the current time is outside the specified timeframe it will return an OK state with the message: [OK] current time outside of monitoring timeframe check_from_time and check_to_time 24-Apr-2007 version 2.1 update includes: 1. support for reporting remedial action 2. exclude running on weekends and holidays
Reviews (1) Add a Review
didn't work
by Majed, July 31, 2011

[root@orcl tmp]# ./check_db_record_count.txt ./check_db_record_count.txt[63]: .: ./utils.sh: cannot open [No such file or directory]



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
1 (1)
Favorites
0
Views
98,972