Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_sql_query
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!
nagios plugin to execute a specific sql query
author: Sergei Haramundanis 08-Aug-2006
usage: check_sql_query access_file query_file
Description:
This plugin will execute a sql query and report the elapsed time it took for the values to return
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)
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, it will execute the sql query
if the query was successful it will return on OK state with the message:
[OK] successful sql query execution | elapsedTime=##secs
if the query was not successful it will return a CRITICAL state with the message:
[CRITICAL] sql query execution failed db_result | elapsedTime=##secs
query execution failure is determined if any ORA- error is received or if the query returned 0 rows
author: Sergei Haramundanis 08-Aug-2006
usage: check_sql_query access_file query_file
Description:
This plugin will execute a sql query and report the elapsed time it took for the values to return
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)
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, it will execute the sql query
if the query was successful it will return on OK state with the message:
[OK] successful sql query execution | elapsedTime=##secs
if the query was not successful it will return a CRITICAL state with the message:
[CRITICAL] sql query execution failed db_result | elapsedTime=##secs
query execution failure is determined if any ORA- error is received or if the query returned 0 rows
Reviews (0)
Be the first to review this listing!