Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_mysql_query.pl (Advanced Nagios Plugins Collection) Popular
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios XI
788707
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!
Part of the Advanced Nagios Plugins Collection, download it here:
https://github.com/harisekhon/nagios-plugins
./check_mysql_query.pl --help
Nagios Plugin to check MySQL arbitrary queries against regex matches or numerical ranges, with perfdata support
usage: check_mysql_query.pl [ options ]
-H --host MySQL Host
-P --port MySQL Port
-u --user MySQL user
-p --password MySQL password
-d --database MySQL database
-q --query MySQL query to execute
-f --field Field number/name to check the results of (defaults to '1')
-e --epoch Subtract result from current time in epoch format from result (useful for timestamp based comparisons)
-m --message Message to output after result. Can take a printf string with a single substitution (defaults to 'query returned')
-n --message-prepend Display message before rather than after result (prepend)
-o --output Exact output to expect
-r --regex Regex to match the result against
-w --warning Warning threshold or ran:ge (inclusive)
-c --critical Critical threshold or ran:ge (inclusive)
-g --graph Perfdata output for graphing
-l --label Perfdata label. If not specified uses field name or Undefined if field name doesn't match a known regex of chars
-U --units Units of measurement for graphing output (%/s/ms/us/B/KB/MB/TB/c)
-s --short Shorten output, do not output message just result
--no-querytime Do not output the mysql query time
-h --help Print description and usage options
-t --timeout Timeout in secs (default: 10)
-v --verbose Verbose mode
-V --version Print version and exit
https://github.com/harisekhon/nagios-plugins
./check_mysql_query.pl --help
Nagios Plugin to check MySQL arbitrary queries against regex matches or numerical ranges, with perfdata support
usage: check_mysql_query.pl [ options ]
-H --host MySQL Host
-P --port MySQL Port
-u --user MySQL user
-p --password MySQL password
-d --database MySQL database
-q --query MySQL query to execute
-f --field Field number/name to check the results of (defaults to '1')
-e --epoch Subtract result from current time in epoch format from result (useful for timestamp based comparisons)
-m --message Message to output after result. Can take a printf string with a single substitution (defaults to 'query returned')
-n --message-prepend Display message before rather than after result (prepend)
-o --output Exact output to expect
-r --regex Regex to match the result against
-w --warning Warning threshold or ran:ge (inclusive)
-c --critical Critical threshold or ran:ge (inclusive)
-g --graph Perfdata output for graphing
-l --label Perfdata label. If not specified uses field name or Undefined if field name doesn't match a known regex of chars
-U --units Units of measurement for graphing output (%/s/ms/us/B/KB/MB/TB/c)
-s --short Shorten output, do not output message just result
--no-querytime Do not output the mysql query time
-h --help Print description and usage options
-t --timeout Timeout in secs (default: 10)
-v --verbose Verbose mode
-V --version Print version and exit
Reviews (1)
byfeedback, November 18, 2014
Support for the --extra-opts argument, such as the following would mean that credentials could be easily hidden from the nrpe processes.
--extra-opts=mysql@/home/nrpe/.plugins.ini
--extra-opts=mysql@/home/nrpe/.plugins.ini