Delivering alarms to Slack and Telegram
A relay is a channel that delivers NetSense alarms to your team. NetSense supports Slack, Telegram, Alerta and generic webhooks. A relay is configured once and then attached to any alarm definitions that should use it; an alarm can notify several channels at once.
This guide walks through the two most popular options. Both can run side by side, so teams often keep Telegram for one audience and Slack for another.
Slack delivery uses incoming webhooks. One webhook posts to one channel, so create a webhook for each channel you want alarms in.
- If you don’t use Slack yet, create a free workspace, the free tier is enough.
- Create the channel that should receive alarms, e.g.
#alerts. - Go to api.slack.com/apps and choose Create an App → From scratch. Name it something recognisable, e.g. “NetSense Alerts”, and pick your workspace.
- In the app’s settings open Features → Incoming Webhooks and switch them on.
- Click Add New Webhook to Workspace, select your alarms channel, and confirm.
- Copy the generated webhook URL (it starts with
https://hooks.slack.com/services/...). - Add it as a relay in NetSense, or send the URL to NetSense support and we configure the relay for you.
Repeat steps 5-7 with another channel for each additional destination (for example a separate channel per region or per team).
Telegram
Section titled “Telegram”Telegram delivery uses a bot that posts into your group.
- Create a bot with Telegram’s @BotFather (
/newbot) and note the bot token, or ask NetSense support to provide a ready-made bot for your tenant. - Create the Telegram group that should receive alarms.
- Add the bot to the group. This is the step most often missed, and without it alarms are silently lost.
- Get the group’s chat ID. Group chat IDs are negative numbers (often starting with
-100...). - Configure the relay in NetSense with the bot token and chat ID, or send both to support.
One bot token is enough for any number of groups: create more groups, add the same bot to each, and configure a relay per chat ID.
Routing alarms to different channels
Section titled “Routing alarms to different channels”Beyond “everything to one channel”, relays can route by device grouping:
- Zone ID: route alarms for a zone (a region, city or POP grouping) to its own channel.
- Partner ID: route alarms for devices tagged with a partner (for example a local cable operator or franchisee) to that partner’s dedicated group.
Rules are processed Partner ID first, and processing stops on a match, so a partner-tagged device alarms only in the partner channel and doesn’t duplicate into the zone channel.
A common pattern for operators working with local partners: tag each partner’s devices with a Partner ID, create one Telegram group per partner with the bot added, and each partner sees only their own alarms.
If alarms don’t arrive
Section titled “If alarms don’t arrive”- The bot or webhook isn’t actually in the target group/channel. This is the most common cause by far: re-add the bot to the Telegram group, or re-check which channel the Slack webhook posts to.
- Give it a couple of minutes. Alarms fire on the next polling cycle after a condition becomes true (plus any alarm delay you configured), not at the same second.
- The condition doesn’t raise the alarm you expect. A manually shut (admin-down) port does not raise the normal port-down alarm; there is a separate “PON Port Shutdown” alarm type for that case.
- Check the relay state. In the alarm definition’s Relays section the selector shows whether each relay is currently running.
For what gets sent (raise, clear and periodic reminders) and how to attach relays to alarm definitions, see Creating alarm definitions and rules.