Merge pull request #90 from msupino/master
rolling back changes, to prevent dedup of different services
This commit is contained in:
commit
0fbbb44aee
1 changed files with 1 additions and 3 deletions
|
@ -33,14 +33,12 @@ SEVERITY_MAP = {
|
|||
'passing': 'ok',
|
||||
}
|
||||
|
||||
correlate = ['critical','warning','passing']
|
||||
|
||||
def createalert( data ):
|
||||
try:
|
||||
environment = client.kv.get('alerta/env/{0}'.format(data['Node']))[1]['Value']
|
||||
except:
|
||||
environment = client.kv.get('alerta/defaultenv')[1]['Value']
|
||||
alert = Alert(resource=data['Node'], event=data['Status'], correlate=correlate, environment=environment, service=[data['CheckId']], severity=SEVERITY_MAP[data['Status']], text=data['Output'], timeout=timeout, origin=origin, type=alerttype)
|
||||
alert = Alert(resource=data['Node'], event=data['CheckId'], value=data['Status'], correlate=SEVERITY_MAP.keys(), environment=environment, service=[data['CheckId']], severity=SEVERITY_MAP[data['Status']], text=data['Output'], timeout=timeout, origin=origin, type=alerttype)
|
||||
for i in range(max_retries):
|
||||
try:
|
||||
print("Response:")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue