Forum Discussion
Webhooks Showing actual results not link
You put "IncludeSearchResults":true into the payload. https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-alerts-actions#webhook-actions
{
"alertname":"#alertrulename",
"IncludeSearchResults":true
}
I'm putting that and getting InternalServerError (this is for slack)
- Brian WrenNov 07, 2017
Microsoft
You're seeing an internal server error in the payload? I just tested that exact syntax and got the detailed results as expected. Can you give me some more details and possibly screenshots to try to figure out what's going on?
- AnonymousNov 07, 2017
Its posting but nothing comes out
- Brian WrenNov 07, 2017
Microsoft
I think I see what's going on. Slack expects a payload with a single property called text. I think you're sending the detailed records, but Slack is only selecting the text property. You can test this with https://requestb.in which will accept a test webhook and show you the exact payload it received.
The challenge is I don't think we can format our payload like that directly from the alert. You would need those detailed records in the text property, but we put them in a property called SearchResults. Unless Slack gives you more flexibility to specify the property in the payload you want, I think you'd need to do something like have the alert call a runbook that scrubbed the data into the format you need before passing it on to Slack.