diff --git a/check_elasticsearch b/check_elasticsearch index a1d39a2..d034040 100755 --- a/check_elasticsearch +++ b/check_elasticsearch @@ -614,6 +614,9 @@ def get_json(uri): def version(version_string): """Accept a typical version string (ex: 1.0.1) and return a tuple of ints, allowing for reasonable comparison.""" + dash = version_string.find('-') + if dash != -1: + version_string = version_string[0:dash] return tuple([int(i) for i in version_string.split('.')])