Skip to content

Commit a93c65f

Browse files
committed
Trying to fix some of the pep8 errors
1 parent 0123940 commit a93c65f

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

check_es_cluster_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def check(self, opts, args):
4949
"Yellow")
5050
else:
5151
raise Status("OK",
52-
"Cluster status is currently reporting as Green")
52+
"Cluster status is currently reporting as Green")
5353

5454
if __name__ == "__main__":
5555
ESClusterHealthCheck().run()

check_es_split_brain.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ def check(self, opts, args):
2929
for node in nodes:
3030
try:
3131
response = urllib2.urlopen(
32-
r'http://%s:%d/_cluster/state/nodes,master_node/'
33-
% (node, port))
32+
r'http://%s:%d/_cluster/state/nodes,master_node/'
33+
% (node, port))
3434
response_body = response.read()
3535
response = json.loads(response_body)
3636
except (urllib2.HTTPError, urllib2.URLError), e:
@@ -52,8 +52,10 @@ def check(self, opts, args):
5252
"%s" % (str("\r\n".join(failed_nodes))))
5353
elif len(masters) != 1:
5454
raise Status('Critical', "%d masters (%s) found in %s cluster"
55-
% (len(masters), str(", ".join(masters)), cluster_name)
56-
)
55+
% (len(masters),
56+
str(", ".join(masters)), cluster_name
57+
)
58+
)
5759
else:
5860
if len(failed_nodes) == 0:
5961
raise Status('OK', "%d/%d nodes have same master"

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from setuptools import setup, find_packages
22

3+
34
def parse_requirements(filename):
45
""" load requirements from a pip requirements file """
56
lineiter = (line.strip() for line in open(filename))
@@ -14,12 +15,16 @@ def parse_requirements(filename):
1415
author='Paul Stack',
1516
author_email='[email protected]',
1617
url="https://github.com/opentable/nagios-elasticsearch",
17-
download_url = 'https://github.com/stack72/nagios-elasticsearch/tarball/0.1.2',
18-
scripts=["check_es_nodes.py","check_es_cluster_status.py","check_es_jvm_usage.py", "check_es_unassigned_shards.py","check_es_split_brain.py"],
18+
download_url='http://github.com/stack72/nagios-elasticsearch/tarball/0.1.2',
19+
scripts=["check_es_nodes.py",
20+
"check_es_cluster_status.py",
21+
"check_es_jvm_usage.py",
22+
"check_es_unassigned_shards.py",
23+
"check_es_split_brain.py"],
1924
license="MIT",
2025
install_requires=parse_requirements("requirements.txt"),
2126
include_package_data=True,
22-
keywords = ['monitoring','nagios','elasticsearch'],
27+
keywords=['monitoring', 'nagios', 'elasticsearch'],
2328
classifiers=[],
2429

2530
)

0 commit comments

Comments
 (0)