Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
This plugin checks a database by connecting to it and running a select query. The idea is to check not just that the server is not just up, but also that it is responding to connection requests and can run queries.
Current Version
1.0
Last Release Date
2026-01-06
Owner
Chad Columbus
Download URL
https://exchange.nagios.org/wp-content/uploads/2026/01/check_database_deeply.zip
License
GPL
Compatible With
Plugin check_database_deeply.pl
Options: -h Print detailed help screen
-H (Optional. Default: 127.0.0.1) Hostname or IP
-d (Required) Name of the database to connect to for the DBI connection string.
-u (Required) SQL username, for the DBI connection string #### WARNING ### I highly recommend you create a dedicated user for this check. A user that has no privileges except to run the test query (i.e. "Show Databases" or similar read only query). #### WARNING ###
-p (Required) SQL user's password, for the DBI connection string
-t (Optional. Default: mysql) Any Perl DBI:. i.e. mysql MariaDB, Pg (PostgreSQL), etc.
-q (Optional. Default: Show Databases) ### CAUTION ### This should ALWAYS be a read only (select) query. A read only (select) query to check that the DB will run queries.
########################### # For security I highly recommend you don't pass -H or --Host and always force the script to use 127.0.0.1 (localhost). # Example command definition: define command { command_name check_database_deeply command_line $USER1$/check_database_deeply.pl -d '$ARG1$' -u '$ARG2$' -p '$ARG3$' -t '$ARG4$' -q '$ARG5$' }
# If you feel it is safe to use this over the network you could use this (but PLEASE don't): define command { command_name check_database_deeply command_line $USER1$/check_database_deeply.pl -H $HOSTALIAS$ -d '$ARG1$' -u '$ARG2$' -p '$ARG3$' -t '$ARG4$' -q '$ARG5$' } # If you need remote checks the right way to do them is to install this script on the remote server and use nrpe to call it using the default 127.0.0.1 host.
########################### # Example service definition: define service { use local-service host_name (Hostname) service_description Check Database Deeply check_command check_database_deeply!yourDBname!yourUSERname!yourPASSword!yourDBtype!yourREADONLYquery }
You must be logged in to submit a review.
To:
From: