MySQL Alive
Valdinger, Stephen (DOV, MSX)
svalding at doverchem.com
Wed Jul 16 18:24:55 CEST 2008
Please always respond on list so others have the benefit of the
conversation. You could do as Tom suggested and use check_tcp on port
3306 to see if you get a response, but in order to really grasp how the
mysql process is running/responding you will need to go at it a bit
harder than just a tcp port check. Have you thought about setting up the
username and password as macros and passing them as $ARG...$ statements
in your commands? This would eliminate the need for a username and
password being stored plain text inside of the check command if that is
your worry. Have a look at the documentation on custom macros inside of
resource files:
(http://nagios.sourceforge.net/docs/2_0/configmain.htm#resource_file)
Resource File
Format: resource_file=<file_name>
Example: resource_file=/usr/local/nagios/etc/resource.cfg
This is used to specify an optional resource file that can contain
$USERn$ macro definitions. $USERn$ macros are useful for storing
usernames, passwords, and items commonly used in command definitions
(like directory paths). The CGIs will not attempt to read resource
files, so you can set restrictive permissions (600 or 660) on them to
protect sensitive information. You can include multiple resource files
by adding multiple resource_file statements to the main config file -
Nagios will process them all. See the sample resource.cfg file in the
base of the Nagios directory for an example of how to define $USERn$
macros.
Stephen Valdinger
MIS Helpdesk Coordinator
330.365.3622 -O
740.491.0958 - C
svalding at doverchem.com
-----Original Message-----
From: Jeff Koch [mailto:jeffkoch at intersessions.com]
Sent: Wednesday, July 16, 2008 12:18 PM
To: Valdinger, Stephen (DOV, MSX)
Subject: RE: [Nagios-users] MySQL Alive
We need to check mysql remotely so check_proc is no good. Also, we would
prefer to not have mysql usernames and passwords in our scripts. Isn't
there a plugin or method to just query the port and see if mysql
responds?
At 10:41 AM 7/16/2008, you wrote:
>I would use check_procs to see if the mysqld process is running if you
>do not want to log in. However, I would advise using the check_mysql
>plugin and actually probing the mysql server for functionality. Having
>the process running doesn't necessarily mean things are running
smoothly
>;-)
>
>Stephen Valdinger
>MIS Helpdesk Coordinator
>330.365.3622 -O
>740.491.0958 - C
>svalding at doverchem.com
>
>-----Original Message-----
>From: Jeff Koch [mailto:jeffkoch at intersessions.com]
>Sent: Wednesday, July 16, 2008 10:41 AM
>To: nagios-users at lists.sourceforge.net
>Subject: [Nagios-users] MySQL Alive
>
>
>Hi:
>
>We're new with nagios but learning.
>
>We need to be able to check whether mysql is alive on a server - we
>don't
>want to log in. I've looked at the check_mysql and check_mysql_query
>plugins and they seem to require username and password.
>
>Can anyone advise on how to verify that MySQL is alive?
>
>
>
>
>Best Regards,
>
>Jeff Koch, Intersessions
>
>
>-----------------------------------------------------------------------
-
>-
>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
Best Regards,
Jeff Koch, Intersessions
-------------------------------------------------------------------------
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