Skip to content

Commit

Permalink
fixed default prefix handling for ES 5.x compatibility (fixes anchor#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
WBTMagnum committed Nov 28, 2016
1 parent 74b691a commit 203f12d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_elasticsearch
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ElasticSearchCheck(NagiosCheck):
host = opts.host or "localhost"
port = int(opts.port or '9200')
prefix = opts.prefix or ""
if not prefix.endswith('/'):
if len(prefix) > 0 and not prefix.endswith('/'):
prefix += '/'

failure_domain = []
Expand Down

0 comments on commit 203f12d

Please sign in to comment.