msg fix; variable fixup
This commit is contained in:
@@ -252,6 +252,10 @@ class Host:
|
||||
except:
|
||||
self.latency = 0
|
||||
|
||||
try:
|
||||
a=self.cver
|
||||
except:
|
||||
self.cver = 0
|
||||
|
||||
|
||||
def getstate(self):
|
||||
@@ -518,15 +522,15 @@ def readsock(sock):
|
||||
if message:
|
||||
log(name, "msg: %s" % message, service=service)
|
||||
if name in watchhosts:
|
||||
email("msg", m)
|
||||
pushover(m)
|
||||
email("msg", message)
|
||||
pushover(message)
|
||||
|
||||
res = host.newaddr(addr[0])
|
||||
if res:
|
||||
log(name, res)
|
||||
if name in watchhosts:
|
||||
email("address change", "%s %s" % (host.name, res))
|
||||
pushover(m)
|
||||
pushover("%s %s" % (host.name, res))
|
||||
|
||||
if host.getstate() != Host.up and interval > 0:
|
||||
lasts = host.state
|
||||
|
||||
Reference in New Issue
Block a user