Hello @stephen!
I was able to make it work after discussing this internally with our teams and running a few tests. The Slack integration looks into a client field inside custom_details. If you send a payload to Events API similar to the one below it should work.
{
"payload": {
"summary": "DISK at 99% on machine prod-datapipe03.example.com",
"timestamp": "2024-02-05T16:42:58.315+0000",
"severity": "critical",
"source": "prod-datapipe03.example.com",
"component": "mysql",
"group": "prod-datapipe",
"class": "disk",
"custom_details": {
"free space": "1%",
"ping time": "1500ms",
"load avg": 0.75,
"client": "Postman" // THIS IS THE ONLY THING YOU NEED TO ADD TO YOUR EVENT
}
},
"event_action": "trigger",
"routing_key": "YOUR_ROUTING_KEY"
}
Let me know if this worked for you or not. And since this is not well documented I’ll look into updating the documentation for the next person to avoid this challenge.
Really? I got it working with client and client_url outside of payload, show in the example here https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event although not mentioned anywhere else on the page
You are correct @stephen. For some strange reason, I probably documented the tests I performed earlier poorly. I’ve ran the tests and you I can confirm the triggered by
field shows up when I send client
and client_url
outside of payload.
I’ll add this to the how-to’s in the community forums shortly for anyone else looking for the same thing. Thanks!
@tiago barbosa I noticed yesterday that the Slack notifications changed, the big icon on the right hand side is gone and there is now a little spot circle next to the name of the alert… fair enough
but the “Triggered by” is gone as well and there is just “via XYZ” at the bottom but that does not link through to the client_url, that is a huge step back in usability
Thanks for reporting it @stephen. I still see the ‘Triggered by’ message in the bottom. But the link points to the integration defined on the service, not the actual source of the event (Postman in my case).
In order to navigate to the client url you would need to open the incident, scroll down to the alert and click on the client link.
I’ll pass this feedback to the team responsible for the Slack extension so they are aware of your feedback. Thanks!
Thanks, I understand that you can still find the link within PagerDuty but it’s not an extra click and having to log in to get to the information, which just slows things down
I see the link was re-added last Friday, thanks for that!