Does anyone already have a script that will parse an incoming OpsGenie webhook and turn it into a message that rocket.chat likes?
From digging it out of the logs, looks like they’re sending e.g.:
{
action: 'Acknowledge',
alert: {
alertId: 'fxxxxxx9-xxxx-xxxx-xxxx-xxxxxxxxxxxx-1532948900683',
message: 'Test alert: https://youtu.be/J91ti_MpdHA?t=5',
tags: [],
tinyId: '2',
entity: '',
alias: 'fxxxxxx9-xxxx-xxxx-xxxx-xxxxxxxxxxxx-1532948900683',
createdAt: 1522948900683,
updatedAt: 1522948957348000500,
username: 'michael@pandas-are-awesome.net',
userId: '6xxxxxx5-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
teams: [ 'bxxxxxxf-xxxx-xxxx-xxxx-xxxxxxxxxxxx' ],
priority: 'P3',
source: 'michael@pandas-are-awesome.net'
},
source: { name: '', type: 'web' },
integrationName: 'Webhook',
integrationId: '5xxxxxx1-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
integrationType: 'Webhook'
}