change overdue state to unknown anfetr 7 days
This commit is contained in:
@@ -55,6 +55,7 @@ verbose = False
|
||||
|
||||
INTERVAL = 10
|
||||
GRACE = 2
|
||||
DROPOVERDUE = 7*24*3600
|
||||
|
||||
os.environ['TZ'] = 'EST5EDT'
|
||||
|
||||
@@ -305,6 +306,8 @@ def checkoverdue():
|
||||
if conn.state == Connection.up and (now - conn.lastbeat) > timeout:
|
||||
conn.newstate(Connection.overdue, now, grace)
|
||||
pmsg.append(conn.afam)
|
||||
if conn.state == Connection.overdue and (now - conn.lastbeat) > DROPOVERDUE:
|
||||
conn.newstate(Connection.unknown, conn.lastbeat)
|
||||
if pmsg != []:
|
||||
if h in watchhosts:
|
||||
email("overdue", "%s overdue" % " and ".join(pmsg))
|
||||
|
||||
Reference in New Issue
Block a user