]> granicus.if.org Git - icinga2/commitdiff
Add elasticsearch checkcommand to itl
authorDirk Goetz <dirk.goetz@netways.de>
Mon, 15 Jun 2015 13:09:18 +0000 (15:09 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Wed, 17 Jun 2015 13:17:32 +0000 (15:17 +0200)
fixes #9415

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
doc/7-icinga-template-library.md
itl/plugins-contrib.d/databases.conf

index b1ec72f544022e1319a10e3eb97c6faa61cdcf3f..198c0d27c62435bed719d1fe85e46a70113c2866 100644 (file)
@@ -1457,6 +1457,21 @@ mongodb_querytype                | **Optional.** The query type to check [query|
 mongodb_collection               | **Optional.** Specify the collection to check
 mongodb_sampletime               | **Optional.** Time used to sample number of pages faults
 
+### <a id="plugins-contrib-command-elasticsearch"></a> elasticsearch
+
+An ElasticSearch availability and performance monitoring plugin for Nagios provided by [Anchor](http://www.anchor.com.au) on [https://github.com](https://github.com/anchor/nagios-plugin-elasticsearch).
+It ulitizes the API so requires HTTP enabled for your elasticsearch node.
+
+Name                         | Description
+-----------------------------|-------------------------------------------------------------------------------------------------------
+elasticsearch_failuredomain  | **Optional.** A comma-separated list of ElasticSearch attributes that make up your cluster's failure domain.
+elasticsearch_host           | **Optional.** Hostname or network address to probe. Defaults to 'localhost'.
+elasticsearch_masternodes    | **Optional.** Issue a warning if the number of master-eligible nodes in the cluster drops below this number. By default, do not monitor the number of nodes in the cluster.
+elasticsearch_port           | **Optional.** TCP port to probe.  The ElasticSearch API should be listening here. Defaults to 9200.
+elasticsearch_prefix         | **Optional.** Optional prefix (e.g. 'es') for the ElasticSearch API. Defaults to ''.
+elasticsearch_yellowcritical | **Optional.** Instead of issuing a 'warning' for a yellow cluster state, issue a 'critical' alert. Defaults to false.
+
+
 ## <a id="plugins-contrib-ipmi"></a> IPMI Devices
 
 This category includes all plugins for IPMI devices.
index c98c27bf8533988345188cd2151f938e79bb5631..09ffe0f44d199cdde734366ba4f8ad8b515a00ee 100644 (file)
@@ -383,3 +383,39 @@ object CheckCommand "mongodb" {
        vars.mongodb_perfdata = true
        vars.mongodb_action = "connections"
 }
+
+object CheckCommand "elasticsearch" {
+       import "plugin-check-command"
+
+       command = [ PluginDir + "/check_elasticsearch" ]
+
+       arguments = {
+               "--failure-domain" = {
+                       value = "$elasticsearch_failuredomain$"
+                       description = "A comma-separated list of ElasticSearch attributes that make up your cluster's failure domain"
+               }
+               "--host" = {
+                       value = "$elasticsearch_host$"
+                       description = "Hostname or network address to probe, defaults to 'localhost'"
+               }
+               "--master-nodes" = {
+                       value = "$elasticsearch_masternodes$"
+                       description = "Issue a warning if the number of master-eligible nodes in the cluster drops below this number. By default, do not monitor the number of nodes in the cluster"
+               }
+               "--port" = {
+                       value = "$elasticsearch_port$"
+                       description = "TCP port to probe, defaults to 9200"
+               }
+               "--prefix" = {
+                       value = "$elasticsearch_prefix$"
+                       description = "Optional prefix for the ElasticSearch API, defaults to ''"
+               }
+               "--yellow-critical" = {
+                       value = "TRUE"
+                       set_if = "$elasticsearch_yellowcritical$"
+                       description = "Instead of issuing a 'warning' for a yellow cluster state, issue a 'critical' alert"
+               }
+       }
+
+       vars.elasticsearch_yellowcritical = false
+}