Currently, I am using InfluxDB version 2.1.1, where my alerts are sent to Slack. With the migration to a new server, InfluxDB will be updated to version 2.7.10, and I now need these alerts to be redirected to a group on Telegram.
What I would like to do is keep the entire alert structure I’ve already set up, simply copying the existing configuration and changing only the endpoint from Slack to Telegram. I’ll share some screenshots of my current InfluxDB setup to give a clearer idea of what needs to be adjusted.
This thread might be helpful (its been a long time since ive used that package) and read through the solutions it might be easier than making a telegram.endpoint() function which you’ll need to define if you want to mirror the script you gave me as closely as possible.
So the slack.endpoint function is a factory function that returns a function (slack.message() ) that can be used to send a message to Slack per input row.
See how it works here:
But I believe you could borrow the function definition from slack and alter it to fit the requirements of the telegram message and then use it.