riemann.telegram

Send events to Telegram

telegram

(telegram opts)

Send events to Telegram chat. Uses your bot token and returns a function, which send message through API to specified chat.

Format event (or events) to string with markdown syntax.

Telegram bots API documentation: https://core.telegram.org/bots/api

Usage:

(def token “define_your_token”) (def chat_id “0123456”)

(streams (rollup 5 3600 (telegram {:token token :chat_id chat_id})))

Example:

(def telegram-async (batch 10 1 (async-queue! :telegram-async ; A name for the forwarder {:queue-size 1e4 ; 10,000 events max :core-pool-size 5 ; Minimum 5 threads :max-pools-size 100} ; Maximum 100 threads (telegram {:token “275347130:AAEdWBudgeQCV87O0ag9luwwFGcN2Efeqk4” :chat_id “261032559” }))))