Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.pod

NAME

check_mysql_stats - Nagios plugin for MySQL status monitoring

FEATURES

Why this, instead of the basic check_mysql?

Check specific stats against thresholds

Want to just check the number of open tables is in a range you expect?

Sure, just -s 'Open tables:10:200' -t 20 - if the number of tables is less than 10 or more than 200, you'll get an alarm - a WARNING if it's just outside, a CRITICAL if it's outside by more than 20%. You can repeat -s parameters to check as many different stats (as returned by mysqladmin status as you wish.

Returns perfdata

Using nagiosgraph or Graphios to get metrics graphing from Nagios? This plugin will return perfdata, either for all stats if no specific stats were named to check, or for the stat(s) named otherwise.

Useful Queries per second metric

mysqladmin status gives you a Queries per second avg metric, which would at first glance seem useful to you if you want to graph the number of queries your database servers are seeing. It's not, though, as it's the average QPS since the server started, not for the last short period, so it won't reflect changes in the query load the DB is seeing usefully.

If you use the --saved_state parameter, then the status we get on each run will be written to the named file; when we next run, we read the last run's stats from the file - then, given we can work out how many new queries we've seen since that file was updated, and how many seconds have passed since it was updated, we can add a new Queries per second metric which is actually useful.

(That metric can be used for threshold-checking just like any other one, and will be returned in perfdata so you can graph it.)

AUTHOR

David Precious <[email protected]>

FEEDBACK

Feedback very much welcomed. Do feel free to drop me an email and let me know if this is useful to you!

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 44:

You forgot a '=back' before '=head1'