]> granicus.if.org Git - icinga2/commitdiff
Add proxysql CheckCommand definition 6862/head
authorBarbUk <julien.virey@gmail.com>
Sat, 22 Dec 2018 07:01:30 +0000 (11:01 +0400)
committerBarbUk <julien.virey@gmail.com>
Sat, 22 Dec 2018 07:01:30 +0000 (11:01 +0400)
doc/10-icinga-template-library.md
itl/plugins-contrib.d/databases.conf

index e8f48ab287a0181e149b99cc3dbeb1ec4852c260..4f6283d29f430c0943190bedd369b329c29862aa 100644 (file)
@@ -2492,6 +2492,28 @@ redis_memory_utilization | **Optional.** This calculates percent of total memory
 redis_total_memory       | **Optional.** Amount of memory on a system for memory utilization calculation. Use system memory or max_memory setting of redis.
 redis_replication_delay  | **Optional.** Allows to set threshold on replication delay info.
 
+#### proxysql <a id="plugin-contrib-command-proxysql"></a>
+
+The [check_proxysql](https://github.com/sysown/proxysql-nagios) plugin,
+uses the `proxysql` binary to monitor [proxysql](https://proxysql.com/).
+
+Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
+
+Name                         | Description
+-----------------------------|----------------------------------------------------------------------------------
+proxysql_user                | **Optional.** ProxySQL admin username (default=admin)
+proxysql_password            | **Optional.** ProxySQL admin password (default=admin)
+proxysql_host                | **Optional.** ProxySQL hostname / IP (default=127.0.0.1)
+proxysql_port                | **Optional.** ProxySQL admin port (default=6032)
+proxysql_defaultfile         | **Optional.** ProxySQL defaults file
+proxysql_type                | **Required.** ProxySQL check type (one of conns,hg,rules,status,var)
+proxysql_name                | **Optional.** ProxySQL variable name to check
+proxysql_lower               | **Optional.** Alert if ProxySQL value are LOWER than defined WARN / CRIT thresholds (only applies to 'var' check type)
+proxysql_runtime             | **Optional.** Force ProxySQL Nagios check to query the runtime_mysql_XXX tables rather than the mysql_XXX tables
+proxysql_warning             | **Optional.** Warning threshold
+proxysql_critical            | **Optional.** Critical threshold
+proxysql\_include\_hostgroup | **Optional.** ProxySQL hostgroup(s) to include (only applies to '--type hg' checks, accepts comma-separated list)
+proxysql\_ignore\_hostgroup  | **Optional.** ProxySQL hostgroup(s) to ignore (only applies to '--type hg' checks, accepts comma-separated list)
 
 ### Hardware <a id="plugin-contrib-hardware"></a>
 
index c12475d19b33eb3ca1f0b6dc351d1cfad74ba56f..18ddc7311393801c9dd40e22a945ff98cf274a73 100644 (file)
@@ -842,3 +842,64 @@ object CheckCommand "redis" {
        vars.redis_perfparse = false
        vars.redis_prev_perfdata = false
 }
+
+object CheckCommand "proxysql" {
+       import "plugin-check-command"
+       command = [ PluginDir + "/check_proxysql" ]
+
+       arguments = {
+               "--user" = {
+                       value = "$proxysql_user$"
+                       description = "ProxySQL admin username (default=admin)"
+               }
+               "--password" = {
+                       value = "$proxysql_password$"
+                       description = "ProxySQL admin password (default=admin)"
+               }
+               "--host" = {
+                       value = "$proxysql_host$"
+                       description = "ProxySQL hostname / IP (default=127.0.0.1)"
+               }
+               "--port" = {
+                       value = "$proxysql_port$"
+                       description = "ProxySQL admin port (default=6032)"
+               }
+               "--defaults-file" = {
+                       value = "$proxysql_defaultfile$"
+                       description = "ProxySQL defaults file"
+               }
+               "--type" = {
+                       value = "$proxysql_type$"
+                       description = "ProxySQL check type (one of conns,hg,rules,status,var)"
+                       required = true
+               }
+               "--name" = {
+                       value = "$proxysql_name$"
+                       description = "ProxySQL variable name to check"
+               }
+               "--lower" = {
+                       value = "$proxysql_lower$"
+                       description = "Alert if ProxySQL value are LOWER than defined WARN / CRIT thresholds (only applies to 'var' check type)"
+               }
+               "--runtime" = {
+                       value = "$proxysql_runtime$"
+                       description = "Force ProxySQL Nagios check to query the runtime_mysql_XXX tables rather than the mysql_XXX tables"
+               }
+               "--warning" = {
+                       value = "$proxysql_warning$"
+                       description = "Warning threshold"
+               }
+               "--critical" = {
+                       value = "$proxysql_critical$"
+                       description = "Critical threshold"
+               }
+               "--include-hostgroup" = {
+                       value = "$proxysql_include_hostgroup$"
+                       description = "ProxySQL hostgroup(s) to include (only applies to '--type hg' checks, accepts comma-separated list)"
+               }
+               "--ignore-hostgroup" = {
+                       value = "$proxysql_ignore_hostgroup$"
+                       description = "ProxySQL hostgroup(s) to ignore (only applies to '--type hg' checks, accepts comma-separated list)"
+               }
+       }
+}