Brian Dockter <specus@gmail.com>
Bruno Lingner <mail@hugo.ro>
Carlos Cesario <carloscesario@gmail.com>
+Christian Birk <mail@birkc.de>
Christian Harke <ch.harke@gmail.com>
Christian Jonak <christian@jonak.org>
Christian Lehmann <christian_lehmann@gmx.de>
mysql_cadir | **Optional.** Path to CA directory.
mysql_ciphers | **Optional.** List of valid SSL ciphers.
+
+### <a id="plugin-check-command-mysql-query"></a> mysql_query
+
+Check command object for the `check_mysql_query` plugin.
+
+Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
+
+Name | Description
+------------------------|---------------------------------------------------------------
+mysql_query_hostname | **Optional.** Host name, IP Address, or unix socket (must be an absolute path).
+mysql_query_port | **Optional.** Port number (default: 3306).
+mysql_query_database | **Optional.** Check database with indicated name.
+mysql_query_file | **Optional.** Read from the specified client options file.
+mysql_query_group | **Optional.** Use a client options group.
+mysql_query_username | **Optional.** Connect using the indicated username.
+mysql_query_password | **Optional.** Use the indicated password to authenticate the connection.
+mysql_query_execute | **Required.** SQL Query to run on the MySQL Server.
+mysql_query_warning | **Optional.** Exit with WARNING status if query is outside of the range (format: start:end).
+mysql_query_critical | **Optional.** Exit with CRITICAL status if query is outside of the range.
+
+
### <a id="plugin-check-command-negate"></a> negate
Check command object for the `negate` plugin.
}
}
}
+
+object CheckCommand "mysql_query" {
+ import "plugin-check-command"
+ import "ipv4-or-ipv6"
+
+ command = [ PluginDir + "/check_mysql_query" ]
+
+ arguments = {
+ "-H" = "$mysql_query_hostname$"
+ "-P" = "$mysql_query_port$"
+ "-u" = "$mysql_query_username$"
+ "-p" = "$mysql_query_password$"
+ "-d" = "$mysql_query_database$"
+ "-f" = "$mysql_query_file$"
+ "-g" = "$mysql_query_group$"
+ "-q" = "$mysql_query_execute$"
+ "-w" = "$mysql_query_warning$"
+ "-c" = "$mysql_query_critical$"
+ }
+
+ vars.mysql_query_hostname = "$check_address$"
+}