ajout du downtime
This commit is contained in:
parent
aa558146fe
commit
b32fc936c6
20
data.py
20
data.py
|
@ -180,23 +180,23 @@ class DataStore:
|
||||||
# We have a recovery
|
# We have a recovery
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if "DOWNTIMESTART" in cur.type and not self.downtime:
|
if "DOWNTIME" in type:
|
||||||
message = "début de DOWNTIME" \
|
if "DOWNTIMESTART" in type and not self.downtime:
|
||||||
" sur %s" % (host)
|
|
||||||
cur.downtime = True
|
cur.downtime = True
|
||||||
|
message = "début de downtime sur" \
|
||||||
|
" sur %s (%s)" % (host, text)
|
||||||
# send notification
|
# send notification
|
||||||
log.info("Sending to %s: %s" % (destmuc, message))
|
log.info("Sending to %s: %s" % (destmuc, message))
|
||||||
self.linkedBot.push(destmuc, cur.maintainer+", "+message)
|
self.linkedBot.push(destmuc, cur.maintainer+", "+message)
|
||||||
elif "DOWNTIMEEND" in cur.type and self.downtime:
|
|
||||||
message = "fin de DOWNTIME" \
|
elif "DOWNTIMEEND" in type and not self.downtime:
|
||||||
" sur %s" % (host)
|
cur.downtime = True
|
||||||
cur.downtime = False
|
message = "début de downtime sur" \
|
||||||
|
" sur %s (%s)" % (host, text)
|
||||||
# send notification
|
# send notification
|
||||||
log.info("Sending to %s: %s" % (destmuc, message))
|
log.info("Sending to %s: %s" % (destmuc, message))
|
||||||
self.linkedBot.push(destmuc, cur.maintainer+", "+message)
|
self.linkedBot.push(destmuc, cur.maintainer+", "+message)
|
||||||
# ignore unregistered downtimes
|
|
||||||
elif "DOWNTIME" in cur.type:
|
|
||||||
pass
|
|
||||||
# General problem
|
# General problem
|
||||||
elif not service and problemCount == 0:
|
elif not service and problemCount == 0:
|
||||||
message = "fin d'alerte générale sur" \
|
message = "fin d'alerte générale sur" \
|
||||||
|
|
Loading…
Reference in New Issue