Open biancaines opened 11 months ago
I dug into this a bit and this looks to be an issue on the apprise side of things. Executing things directly from apprise with:
# Assuming our {integration_key} is A1BRTD4JD
# Assuming our {api_key} is TIiajkdnlazkcOXrIdevi7F
# Assuming our {source} is node01.local
# Assuming our {component} is drive_sda
apprise -vv -t "Test Message Title" -b "Test Message Body" \
"pagerduty://A1BRTD4JD@TIiajkdnlazkcOXrIdevi7F/node01.local/drive_sda/"
yields the following PagerDuty incident
Notice the title and body are being use to set the description
.
The way to work around this for now is to omit a title, and set only the body. The PagerDutyWebHook
class does have an argument custom_details
in which you can stuff any extra information for the event; however, unfortunately, that doesn't support jinja templating. So you can't put anything dynamic into it. It'd be nice if templating were supported there as this would make notifications much more dynamic.
I noticed that if I send an alert to PagerDuty using an Automation -> Pager Duty Webhook Block, the message that is generated from the incident on PagerDuty's side looks like an Events V1 payload, rather than an Events V2 payload. Is this expected?
The way to work around this for now is to omit a title, and set only the body.
The subject is not optional though. At least not on the UI
First check
Bug summary
When using a PagerDuty block with an automation, the fields for the subject and body of the notification become concatenated and are both present in the title of the incident in PagerDuty. When using the default inputs for an automation (with all flow run metadata) it results in a lengthy incident title, which is difficult to interpret.
The screenshots below show how the subject and body of the notification is set, and how the information is currently presented in PagerDuty.
Ideally, the title should only include the subject provided to the automation. The information in the body would be in the Custom Details section of the incident report. See the examples below for how Datadog notifications are presented in PagerDuty.
Reproduction
Error
Versions
Additional context
No response