04/24/2023, 12:44 PM
Hi everyone, We are using OpsgenieWebhook in prefect to create alert in Opsgenie for failures in Prefect using opsgenie_webhook_block.notify. The notify method accepts two parameters body and subject, when we pass both body and subject as below
opsgenie_webhook_block.notify(body = '2 employee ids missing between table', subject = '[123456,34567]')
this creates an alert in Opsgenie but the value of the body parameter is populated for both message and description in the alert Attached sample Opsgenie alert We want the description to be populated with the value of subject parameter i.e '[123456,34567]' or else another parameter by name description to be provided in the notify method. This works as expected when we use Rest API call to create Opsgenie alert, in the API call we have an option to pass description in the payload ref documentation -