Hi everyone,
I’m having an issue with integrating Grafana’s webhook notifications with Mattermost. It seems Mattermost requires a text
field in the payload, but Grafana is sending a message
field instead, which causes the webhook to fail with a 400 Bad Request
error.
Grafana Version:
11.2.1
Grafana Logs:
Webhook failed with statuscode="400 Bad Request" body="No text specified"
Mattermost Logs:
{"error":"HandleIncomingWebhook: No text specified."}
Steps Taken:
-
In Grafana, I set up a custom webhook notification with a basic JSON payload, trying to directly include a text field as shown below:
{ "text": "slouki slouk" }
-
I’ve also tried custom templates and formatting configurations, but the payload Grafana sends consistently includes a
message
field rather thantext
.
Workaround Attempts:
- I’ve tested using
curl
to manually send a payload to Mattermost, and that works as expected whentext
is used. - However, Grafana’s automatic webhook keeps generating the
message
field instead.
Does anyone know if there’s a way to force Grafana to use a text
field instead of message
in the webhook payload? Or, is there a workaround to make Grafana compatible with Mattermost’s webhook requirements?
Thank you in advance for any help or insights!