Skip to content

Commit fa5c9bf

Browse files
committed
Changing the check_es_nodes to make sure that the number of nodes in the cluster is *not less* than the specified. We have removed the requirement on their being *more* than specified. This is because the alert fires everytime we add a new node in the cluster
1 parent 8fd82a9 commit fa5c9bf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: check_es_nodes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def check(self, opts, args):
4444

4545
active_cluster_nodes = es_cluster_health['number_of_nodes']
4646

47-
if active_cluster_nodes != nodes_in_cluster:
47+
if active_cluster_nodes < nodes_in_cluster:
4848
raise Status('CRITICAL', "Number of nodes in the cluster is "
4949
"reporting as '%s' but we expected '%s'"
5050
% (active_cluster_nodes, nodes_in_cluster))
5151
else:
52-
raise Status('OK', "Number of nodes in the cluster is '%s' as "
53-
"expected" % (nodes_in_cluster))
52+
raise Status('OK', "Number of nodes in the cluster is '%s'"
53+
"which is >= %s as expected" % (active_cluster_nodes, nodes_in_cluster))
5454

5555
if __name__ == "__main__":
5656
ESNodesCheck().run()

Diff for: setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ def parse_requirements(filename):
1010
name="nagios-elasticsearch",
1111
description="A selection of Nagios plugins to monitor ElasticSearch.",
1212
long_description=open('README.rst').read(),
13-
version="0.1.3",
13+
version="0.1.4",
1414
packages=find_packages(),
1515
author='Paul Stack',
1616
author_email='[email protected]',
1717
url="https://github.com/stack72/nagios-elasticsearch",
18-
download_url='http://github.com/stack72/nagios-elasticsearch/tarball/0.1.3',
18+
download_url='http://github.com/stack72/nagios-elasticsearch/tarball/0.1.4',
1919
scripts=["check_es_nodes.py",
2020
"check_es_cluster_status.py",
2121
"check_es_jvm_usage.py",

0 commit comments

Comments
 (0)