To do this, in your handler, put a guard in place to make sure that the handler should fire.
Code: Select all
#SUDO CODE
#DETERMINE DOWNTIME STATUS
def isInDowntime(data):
if int(data.downtime) > 0:
return True
else:
return False
#CHECK DOWNTIME STATUS
if isInDowntime(data):
exit()
else:
doStuff(data)
You handler should not introduce more toil, it should help to reduce it
Happy Monitoring!
--SN