I created an ELK Watcher with this action in my Watch JSON to send a message to a Teams channel:
"msteams_webhook": {
"webhook": {
"scheme": "https",
"host": "my.host.com",
"port": 443,
"method": "post",
"path": "/webhookb2/path",
"params": {},
"headers": {
"Content-Type": "application/json"
},
"body": {
"text": "Found the following 4XX or 5XX errors in logs"
}
}
}
When I execute it I get a 400 error with this message in the response body:
Bad payload received by generic incoming webhook.
I think the issue is with the structure of my JSON body but I'm not sure. Can anybody spot the issue here?
I ended up doing: