Skip to content

Commit

Permalink
Updated release version
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Guo committed Sep 28, 2017
1 parent 2d2323e commit 02bf7af
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aerospike_nagios.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

__author__ = "Aerospike"
__copyright__ = "Copyright 2017 Aerospike"
__version__ = "1.4.0"
__version__ = "1.4.1"

import sys
import yaml
Expand Down Expand Up @@ -500,6 +500,8 @@ def parseRange(myRange):
# Append perfdata iff metric value is numeric
try:
value = float(value)
print value
print type(value)
append_perf=True
except:
pass
Expand All @@ -521,18 +523,22 @@ def parseRange(myRange):
# Critical threshold override warning threshold
if args.crit != "0":
crit = parseRange(args.crit)
print(crit)
if crit["mode"] == NAGIOS_OUTER_THRESHOLD:
if crit["start"] == "~":
if value >= crit["end"]:
RETURN_VAL=STATE_CRITICAL
elif value < crit["start"] or value >= crit["end"]:
RETURN_VAL=STATE_CRITICAL
print "3fail"
else: # NAGIOS_INNER_THRESHOLD
if crit["start"] == "~":
if value < crit["end"]:
RETURN_VAL=STATE_CRITICAL
print "2 fail"
elif value > crit["start"] and value < crit["end"]:
RETURN_VAL=STATE_CRITICAL
print "last fail"



Expand Down

0 comments on commit 02bf7af

Please sign in to comment.