Skip to content

Commit

Permalink
Changing the check_es_nodes to make sure that the number of nodes in …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
stack72 committed Jul 9, 2015
1 parent 8fd82a9 commit fa5c9bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions check_es_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ def check(self, opts, args):

active_cluster_nodes = es_cluster_health['number_of_nodes']

if active_cluster_nodes != nodes_in_cluster:
if active_cluster_nodes < nodes_in_cluster:
raise Status('CRITICAL', "Number of nodes in the cluster is "
"reporting as '%s' but we expected '%s'"
% (active_cluster_nodes, nodes_in_cluster))
else:
raise Status('OK', "Number of nodes in the cluster is '%s' as "
"expected" % (nodes_in_cluster))
raise Status('OK', "Number of nodes in the cluster is '%s'"
"which is >= %s as expected" % (active_cluster_nodes, nodes_in_cluster))

if __name__ == "__main__":
ESNodesCheck().run()
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ def parse_requirements(filename):
name="nagios-elasticsearch",
description="A selection of Nagios plugins to monitor ElasticSearch.",
long_description=open('README.rst').read(),
version="0.1.3",
version="0.1.4",
packages=find_packages(),
author='Paul Stack',
author_email='public@paulstack.co.uk',
url="https://github.com/stack72/nagios-elasticsearch",
download_url='http://github.com/stack72/nagios-elasticsearch/tarball/0.1.3',
download_url='http://github.com/stack72/nagios-elasticsearch/tarball/0.1.4',
scripts=["check_es_nodes.py",
"check_es_cluster_status.py",
"check_es_jvm_usage.py",
Expand Down

0 comments on commit fa5c9bf

Please sign in to comment.