Skip to main content

A selection of Nagios plugins to monitor ElasticSearch.

Project description

#Nagios-ElasticSearch

A few simple scripts for checking the state of your [ElasticSearch] cluster using Nagios the endpoints of ElasticSearch

[![Build
Status](https://secure.travis-ci.org/opentable/nagios-elasticsearch.png)](https://secure.travis-ci.org/opentable/nagios-elasticsearch.png)

##How they work

These plugins work by submitting API requests to a local or remote
ElasticSearch server via the [cluster-health] and [node stats] endpoints

###Check Nodes in Cluster

This can be used to specify the nodes that are expected in the cluster. Currently, the check will return as **CRITICAL** if there are any unaccounted for nodes

```
Usage: check_es_nodes.py [options]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose
-E NODES_IN_CLUSTER, --expected_nodes_in_cluster=NODES_IN_CLUSTER
This is the expected number of nodes in the cluster
-H HOST, --host=HOST The cluster to check
-P PORT, --port=PORT The ES port - defaults to 9200

python check_es_nodes.py --host=myescluster.com --expected_nodes_in_cluster=13
```

###Check Cluster Health Status

This plugin can be used to get the current cluster health. This will return OK for Green, Warning for Yellow and Critical for Red.


```
Usage: check_es_cluster_status.py [options]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose
-H HOST, --host=HOST The cluster to check
-P PORT, --port=PORT The ES port - defaults to 9200

python check_es_cluster_status.py --host=myescluster.com
```

###Check for Unassigned Nodes in Cluster

This plugin can be used to check for unassigned shards in the cluster. This can potentially indicate that a node is missing from the cluster. The alert will currently indicate a CRITICAL error if an unassigned shard is found

```
Usage: check_es_unassigned_shards.py [options]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose
-H HOST, --host=HOST The cluster to check
-P PORT, --port=PORT The ES port - defaults to 9200


python check_es_unassigned_shards.py --host=myescluster.com
```

###Check Node JVM Usage

This plugin can be used to ensure that the nodes in the cluster are not approaching, or exceeding, the thresholds that we determine that the JVM needs to run at. Currently, if any of the nodes exceed the critical limt, then the cluster will throw a CRITICAL error. If no nodes exceed the critical threshold but a node exceeds the warning threshold, then the cluster will throw a WARNING.

```
Usage: check_es_jvm_usage.py [options]

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-v, --verbose
-H HOST, --host=HOST The cluster to check
-P PORT, --port=PORT The ES port - defaults to 9200
-C CRITICAL_THRESHOLD, --critical_threshold=CRITICAL_THRESHOLD
The level at which we throw a CRITICAL alert -
defaults to 97% of the JVM setting
-W WARNING_THRESHOLD, --warning_threshold=WARNING_THRESHOLD
The level at which we throw a WARNING alert - defaults
to 85% of the JVM setting


python check_es_unassigned_shards.py --host=myescluster.com
```

###Installation

###Development

###License
This project is licensed under MIT

[cluster-health]: http://www.elasticsearch.org/guide/reference/api/admin-cluster-health.html
[node stats]: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html
[ElasticSearch]: http://www.elasticsearch.org/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nagios-elasticsearch-0.1.4.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file nagios-elasticsearch-0.1.4.tar.gz.

File metadata

File hashes

Hashes for nagios-elasticsearch-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b9a74f67d861dd3ca592c6669e1d0a84d36d9aeb598a23c750714ae03959d248
MD5 08e04b1632cb05d27b8d07b1711eb47e
BLAKE2b-256 83e67fb909013d5716b13b6a584a70c04d90a86584a14aa3ffe6ea237b53d900

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page