New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Telegram notification support #714
Conversation
Looks like some test failures in there. |
(ns ^{:doc "Send events to Telegram"} | ||
riemann.telegram | ||
(:require [clj-http.client :as client] | ||
[clojure.string :refer [join]])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add clojure.string/escape
here, that's why the test is failing.
refer clojure.string/escape
@islander Also you need to update these files as well: https://github.com/riemann/riemann/blob/master/project.clj |
@pradeepchhetri-nd thank, i'll take a look later. So, I just need to add P.S. Sorry for my mistakes and stupid questions, I'm new to clojure and riemann development =) |
@islander Yes. |
LGTM - excluding the configurable formatting. |
@pradeepchhetri I am not overly keen on the |
@jamtur01 by external formating you mean switching between HTML and Markdown? I'll try to add this soon. And what other options we have to replace |
According to formatting: sometimes I send, for example, syslog message in event description, so telegram markdown parser could interpret all special symbols in message ([,],*,_ and so on) and formatting become weird. So, should I make escaping inside format-message function, or it should be done outside of it (in client, or somewhere in riemann streams)? It's the reason i switched to HTML parse_mode (easier to escape :)) example of such message:
becomes something like this: Description: WARNING817C-00036738: app dial.c:2437 in dial exec_full: Unable to create channel of type 'SIP' (cause 20 - Subscriber absent) |
@islander I send a pull request to your fork's |
I've added |
thanks @islander |
Implement sending notification to Telegram chats