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 by default.
Telegram bots API documentation: https://core.telegram.org/bots/api
Options:
:tokenThe telegram token:http-optionsclj-http extra options (optional):telegram-optionsThese options are merged with the:form-paramskey of the request. The:chat_idkey is mandatory. By default, the:parse_modekey is “Markdown”.:message-formatterA function accepting an event and returning a string. (optional). If not specified,html-parse-modeormarkdown-parse-modewill be used, depending on the:parse_modevalue.
Usage:
(def token "define_your_token")
(def chat-id "0123456")
(streams
(telegram {:token token
:telegram-options {:chat_id chat-id
:parse_mode "HTML"}}))