0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-02-05 22:19:45 +00:00
alerta_alerta/etc/alerta/parsers/DeploysServiceLookup.py
2013-03-25 11:04:09 +00:00

46 lines
1 KiB
Python

if resource.startswith('R1'):
service = ['R1']
elif resource.startswith('R2'):
service = ['R2']
elif 'content-app' in resource.lower():
service = ['ContentAPI']
elif resource.startswith('frontend'):
service = ['Frontend']
if alert['event'] == 'DeployFailed':
alert['severity'] = severity.CRITICAL
alert['tags'].append('email:frontend')
elif 'flexible' in resource.lower():
service = ['FlexibleContent']
elif resource.startswith('Identity'):
service = ['Identity']
elif resource.startswith('Mobile'):
service = ['Mobile']
elif resource.startswith('Android'):
service = ['Mobile']
elif resource.startswith('iOS'):
service = ['Mobile']
elif resource.startswith('Soulmates'):
service = ['Soulmates']
elif resource.startswith('Microapps'):
service = ['MicroApp']
elif resource.startswith('Mutualisation'):
service = ['Mutualisation']
elif resource.startswith('Ophan'):
service = ['Ophan']
else:
service = ['Unknown']