]> granicus.if.org Git - icinga2/commitdiff
Add memcached CheckCommand definition
authorBarbUk <julien.virey@gmail.com>
Fri, 28 Jun 2019 12:37:56 +0000 (16:37 +0400)
committerBarbUk <julien.virey@gmail.com>
Fri, 28 Jun 2019 12:37:56 +0000 (16:37 +0400)
doc/10-icinga-template-library.md
itl/plugins-contrib.d/databases.conf

index 23ae6ab460b8d3bfa4f020cb2fda9a4a88a72759..19bea7b4c4b7b50fe5177d2fc3d22bea7e16fed6 100644 (file)
@@ -2559,6 +2559,27 @@ 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)
 
+#### memcached <a id="plugin-contrib-command-memcached"></a>
+
+The [check_memcached](https://packages.debian.org/stretch/nagios-plugins-contrib) plugin
+is provided by the `nagios-plugin-contrib` package on Debian/Ubuntu.
+
+Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
+
+Name                            | Description
+--------------------------------|----------------------------------------------------------------------------------
+memcached_hostname              | **Required.** Hostname or IP address (required) optional ':port' overrides -p
+memcached_port                  | **Optional.** Port number (default: 11211)
+memcached_verbose               | **Optional.** verbose messages
+memcached_keep                  | **Optional.** Keep up to this many items in the history object in memcached (default: 30)
+memcached_minimum_stat_interval | **Optional.** Minimum time interval (in minutes) to use to analyse stats. (default: 30)
+memcached_warning_hits_misses   | **Optional.** Generate warning if quotient of hits/misses falls below this value (default: 2.0)
+memcached_warning_evictions     | **Optional.** Generate warning if number of evictions exceeds this threshold. 0=disable. (default: 10)
+memcached_timeout               | **Optional.** timeout in seconds (default: 1.0)
+memcached_key                   | **Optional.** key name for history object (default: check_memcached)
+memcached_expiry                | **Optional.** expiry time in seconds for history object (default: 7200)
+memcached_performance_output    | **Optional.** output performance statistics as rate-per-minute figures (better suited to pnp4nagios)
+
 ### Hardware <a id="plugin-contrib-hardware"></a>
 
 This category includes all plugin check commands for various hardware checks.
index a9671eb81d808d0ad06d76eff4246adc7ae50308..b8b9c2052a163a081bb2052a18cc26ce66f75437 100644 (file)
@@ -886,3 +886,59 @@ object CheckCommand "proxysql" {
                }
        }
 }
+
+object CheckCommand "memcached" {
+       command = [ PluginDir + "/check_memcached" ]
+
+       arguments = {
+               "-H" = {
+                       value = "$memcached_hostname$"
+                       required = true
+                       description = "Hostname or IP address (required) optional ':port' overrides -p"
+               }
+               "-p" = {
+                       value = "$memcached_port$"
+                       description = "Port number (default: 11211)"
+               }
+               "-v" = {
+                       set_if = "$memcached_verbose$"
+                       description = "verbose messages"
+               }
+               "-n" = {
+                       value = "$memcached_keep$"
+                       description = "Keep up to this many items in the history object in memcached (default: 30)"
+               }
+               "-T" = {
+                       value = "$memcached_minimum_stat_interval$"
+                       description = "Minimum time interval (in minutes) to use to analyse stats. (default: 30)"
+               }
+               "-w" = {
+                       value = "$memcached_warning_hits_misses$"
+                       description = "Generate warning if quotient of hits/misses falls below this value (default: 2.0)"
+               }
+               "-E" = {
+                       value = "$memcached_warning_evictions$"
+                       description = "Generate warning if number of evictions exceeds this threshold. 0=disable. (default: 10)"
+               }
+               "-t" = {
+                       value = "$memcached_timeout$"
+                       description = "timeout in seconds (default: 1.0)"
+               }
+               "-k" = {
+                       value = "$memcached_key$"
+                       description = "key name for history object (default: check_memcached)"
+               }
+               "-K" = {
+                       value = "$memcached_expiry$"
+                       description = "expiry time in seconds for history object (default: 7200)"
+               }
+               "-r" = {
+                       set_if = "$memcached_performance_output$"
+                       description = "output performance statistics as rate-per-minute figures (better suited to pnp4nagios)"
+               }
+       }
+
+       vars.memcached_hostname = "127.0.0.1"
+       vars.memcached_minimum_stat_interval = "10"
+       vars.memcached_performance_output = true
+}