Send Honeycomb trigger states to a Telegram chat
A Honeycomb + Telegram agent flow
A Honeycomb Trigger fires inside Honeycomb and waits for someone to open the UI. If your team watches a Telegram group instead, the alert sits unseen until the next person checks the dashboard. This flow has an agent read your Triggers with get_triggers, note which ones are currently in an alerting state, and write a line to a Telegram chat with send_message naming the trigger, the dataset, and the threshold it crossed. Honeycomb returns the configuration and status when asked, it doesn't push, so the agent polls every couple of minutes and only a trigger that changed state since the last pass produces a new message.
The flow
get_triggersLists Triggers or shows the detailed configuration for a single Trigger.
send_messageSends a text message to a chat.
Step by step
- List the triggers and their state
The agent calls get_triggers for the environment, reading each trigger's name, the dataset it watches, its threshold, and whether it is currently alerting or resolved.
- Diff against the last run
Hold the trigger IDs and their last-seen state. On the next poll, keep only the ones that flipped from ok to alerting, or back, so a trigger that stays red doesn't repost.
- Write the changed ones to Telegram
For each flipped trigger the agent calls send_message to your chat ID with a one-line summary: the trigger name, the dataset, and the value that crossed the threshold.
Tell your agent
Every two minutes, list Honeycomb triggers and find the ones now in an alerting state. For each trigger that changed since your last check, send a Telegram message to chat -100245 with the trigger name, dataset, and threshold, and send a follow-up when it resolves. Don't repost triggers whose state hasn't changed.
Setup
This flow needs both servers connected to your agent. Follow each install guide:
Worth knowing
- get_triggers returns a trigger's configuration and current status, not the underlying query results. If you want the actual metric value in the message, the agent runs run_query for that trigger's dataset as a second call.
- send_message addresses a chat by numeric ID. Resolve the group's ID once and reuse it, and make sure the bot is a member of the group or the send is rejected.
- Honeycomb triggers can fire frequently on noisy datasets. Track state between runs and post on the edge, or the chat fills with the same alert every poll.
Questions
- Does the message arrive the moment a trigger fires?
- No. Honeycomb answers the agent's call rather than pushing, so the message trails the trigger by your polling interval. A two-minute loop keeps it close for most on-call work.
- Can it tell me why the trigger fired?
- get_triggers gives you the threshold and state. For the contributing dimensions, have the agent follow up with run_bubbleup on the trigger's query and include the top result in the message.