don't report return from overdue, only from OVERDUE :-)
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# $Id: watcharnsberg,v 1.4 2005/05/06 14:34:00 andreas Exp $
|
# $Id: watcharnsberg,v 1.5 2005/05/06 14:39:27 andreas Exp $
|
||||||
# Wait for heartbeat messages and act on them (or their absence)
|
# Wait for heartbeat messages and act on them (or their absence)
|
||||||
#
|
#
|
||||||
import time, os, string, sys, socket, curses, atexit, select, SocketServer
|
import time, os, string, sys, socket, curses, atexit, select, SocketServer
|
||||||
@@ -246,7 +246,8 @@ def fromaddr(name, addr, boot):
|
|||||||
if host.getstate() != Host.up:
|
if host.getstate() != Host.up:
|
||||||
lasts=host.state
|
lasts=host.state
|
||||||
d=host.newstate(Host.up)
|
d=host.newstate(Host.up)
|
||||||
log("%s, back after being %s for %s" % (host.name, lasts, dur(d)))
|
if lasts != 'overdue':
|
||||||
|
log("%s, back after being %s for %s" % (host.name, lasts, dur(d)))
|
||||||
host.upcount+=1
|
host.upcount+=1
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user