v0.3.0
This commit is contained in:
parent
e23e1a49d8
commit
fd66274527
|
@ -49,8 +49,12 @@ def cmdmainteneur(owners, nick, text, store):
|
|||
if len(splittedtext) == 2:
|
||||
host = splittedtext[1]
|
||||
|
||||
for realhost in store.knownHosts:
|
||||
if host in realhost:
|
||||
return "le responsable de cette machine est " \
|
||||
+ store.knownHosts[host].maintainer
|
||||
+ store.knownHosts[realhost].maintainer
|
||||
else:
|
||||
return "machine inconnue (tout le monde est son mainteneur ou bien elle n'existe pas)"
|
||||
|
||||
if len(splittedtext) == 3:
|
||||
host = splittedtext[1]
|
||||
|
|
12
data.py
12
data.py
|
@ -135,8 +135,18 @@ class DataStore:
|
|||
|
||||
# If this notification is a problem
|
||||
if not "OK" in status:
|
||||
# Unknown state
|
||||
if "UNKNOWN" in cur.type and problemCount == 0:
|
||||
message = "état inconnu sur (%s)" % (host, text)
|
||||
# send notification
|
||||
log.info("Sending to %s: %s" % (destmuc, message))
|
||||
self.linkedBot.push(destmuc, cur.maintainer+", "+message)
|
||||
# Unknown state
|
||||
elif "UNKNOWN" in cur.type:
|
||||
pass
|
||||
|
||||
# General problem
|
||||
if not "OK" in cur.status and problemCount == 0:
|
||||
elif not "OK" in cur.status and problemCount == 0:
|
||||
message = "je détecte un problème général (%s)" \
|
||||
" sur %s (%s)" % (status, host, text)
|
||||
# send notification
|
||||
|
|
Loading…
Reference in New Issue