Mysql

From Upsilon Project
Jump to: navigation, search


Service Overview

Fedora: nagios-plugins-mysql
Debian: (none)
pkgs.org:: (none)

Source: (none)


External documentation: http://nagiosplugins.org/man/check_mysql

Overview

Note: This check appears to work fine with MariaDB, also.

  • GOOD - If the MySQL server is up, accepting connections.
  • WARN - If the server has some long running transactions.
  • BAD - If the server cannot be connected to.


<pre<noinclude></noinclude>> Uptime: 4791 Threads: 13 Questions: 96141 Slow queries: 0 Opens: 91 Flush tables: 1 Open tables: 64 Queries per second avg: 20.67 </pre<noinclude></noinclude>>

Command

Normally, no additional options are needed, just define the nagios check_mysql command and off you go!

<pre<noinclude></noinclude>> <config>

   ...
   <command id = "check_mysql" exec = "/usr/lib64/nagios/plugins/check_mysql" />
   ....

</config> </pre<noinclude></noinclude>>

Service

As the command example above does not take any options, the following service definition will work;

<pre<noinclude></noinclude>> <config>

   ...
   <service id = "check_mysql" commandRef = "check_mysql" />
   ....

</config> </pre<noinclude></noinclude>>

Authenticated checks

If your server requires authentication, then you can simply add -u and -p to the check_mysql command, like this;

<pre<noinclude></noinclude>> <config>

   ...
   <command id = "check_mysql" exec = "/usr/lib64/nagios/plugins/check_mysql -u root -p mysekretpassword" />
   ....

</config> </pre<noinclude></noinclude>>