Hello everyone,
Using the version 2.12.2 of OpenSearch, I’m trying to build some alerts to monitor my routers.
I wanted to send to notification via a telegram bot using a custom webhook. I’m able to send a static message if the alert trigger but I don’t see how to personalize the message with, for example, the address of the router where the alert triggered.
The problem is the same using slack webhook, I don’t know how to send “interesting” data with my message.
When building the actions of the alert, in the notification part, I can notice the message
part:
Monitor {{ctx.monitor.name}} just entered alert status. Please investigate the issue.
- Trigger: {{ctx.trigger.name}}
- Severity: {{ctx.trigger.severity}}
- Period start: {{ctx.periodStart}}
- Period end: {{ctx.periodEnd}}
But I don’t get how this message is supposed to be transmit via my custom telegram webhook…
There’s how I’ve configured my channel:
Channel type: Custom webhook
Method: POST
Define endpoints by: Webhook URL
Webhook URL: https://api.telegram.org/bot1415818198:.........Y2mUjXl706_0qK3o/sendMessage?chat_id=-4.......772&text=An%20interface%20have%20been%20changed
The webhook header is by default on application/json
A workaround would be to create a rule for each router and build personalized message for each, but this is way too heavy…
Any helps, ideas would be very appreciate!
Regards