Environment Information:
- Grafana Version: v12.0.0
- Operating System: Linux
Objective:
Configure a webhook contact point to forward alert messages to our monitoring system via POST requests with ‘name’ and ‘desc’ parameters in the custom payload.
Successful Test Case:
Verified message delivery using Postman with the following successful implementation:
Current Implementation Attempt:
Configured Webhook Contact Point with custom payload to match Postman’s working configuration:
Issue:
The webhook contact point fails to deliver messages despite matching the Postman configuration that worked successfully.
Expected Behavior:
The webhook should deliver messages to our monitoring system with the same parameters and format as the verified Postman implementation.
Could someone assist me with this configuration issue? I’d greatly appreciate any guidance.
Hi @raeyin03,
notification templates let you fully customize the messages your alerts send out. They’re powerful and flexible, but it can take a little trial and error to get comfortable with them.
To customize quickly your JSON payload, I recommend opening the notification template editor and selecting the example “Create JSON payload for webhook contact point.”
In this view, you can preview the final JSON message and edit the template.
Make sure to give your template and group unique names to avoid conflicts:
-
Replace the default webhook.custom.payload with something like mywebhook.custom.payload.
-
Replace webhook.custom.simple_alerts with your own name. Replace the template definition and template call as well.
-
Give the template group a name, and save it.
After saving, you can assign this template in the Custom Payload setting of your webhook contact point.
Click Edit Payload Template and select your template from the Choose notification template dropdown menu.
To get familiar with notification templates, I recommend exploring these notification templates examples.
Hope this points you in the right direction!