Databases

check_mysql_query.pl (Advanced Nagios Plugins Collection)

Description:

Checks MySQL arbitrary queries against regex matches or numerical ranges, with perfdata support. Obsoleted so many of my custom MySQL related checks, one of my all time favourite plugins!

Current Version

Last Release Date

October 3, 2013

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI

Owner


Project Notes
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
Reviews (1) Add a Review
Support for --extra-opts would be ideal
by feedback, November 30, 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



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
4 (1)
Favorites
0
Views
777,406