Skip to content

Commit

Permalink
Added generator field
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-pickin-epi committed Oct 4, 2024
1 parent 88a4bde commit bcdaecb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sensu-alertmanager
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def process(data):
msg['annotations'] = annotate(entity_name, data['check'], data['entity'])
msg['annotations']['sequence'] = str(data['sequence'])
if 'sensu' in msg['annotations'].keys():
msg['generator'] ='Sensu'
msg['generatorURL'] ='https://{}/c/~/n/{}/events/{}/{}'.format(msg['annotations'].pop('sensu'), md['namespace'], entity_name, md['name'])

if ((args.verbose > 0 and md['name'] != "keepalive") or (args.verbose > 1)):
Expand Down

0 comments on commit bcdaecb

Please sign in to comment.