MySQL Alive

Tom Throckmorton throck at gmail.com
Wed Jul 16 17:53:30 CEST 2008


On Jul 16 10:40, Jeff Koch wrote:
> 
> Hi:
> 
> We're new with nagios but learning.

Welcome :)

> We need to be able to check whether mysql is alive on a server - we don't 
> want to log in.

Is this a policy or a preference?  In other words, is there some specific
reason you don't want to / can't log in, is it OK to log in locally but not
remotely, etc?  For reference, check_mysql only requires PROCESS privs to
perform a basic check - check_mysql_query only requires SELECT.

> I've looked at the check_mysql and check_mysql_query 
> plugins and they seem to require username and password.

Indeed, because they are actually performing SQL queries, which as Stephen V.
points out will provide a higher degree of assurance that everything is working
as expected.  
 
> Can anyone advise on how to verify that MySQL is alive?

Aside from the above, here are a couple of alternatives:

- check_tcp -p 3306, which is moderatly reliable, but can produce false positives

- check_procs (as Stephen suggested), though that presumes you're using nrpe/nsca

- check_log, to watch your error log, esp. (which may again presume nrpe/nsca)

- if the db is the backend for a web application, check the content from some
  url that you _know_ generates a fetch against the db

- some combination of the above + check_cluster :)

You'll find other alternatives on nagiosexchange.org as well, I'm sure.

Hope this helps get you started,

-tt

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list