Skip to content
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 parseMode option Markdown should be case-insensitive #1133

Closed
Appeltabak opened this issue Jan 17, 2017 · 5 comments · Fixed by #1168
Closed

Telegram parseMode option Markdown should be case-insensitive #1133

Appeltabak opened this issue Jan 17, 2017 · 5 comments · Fixed by #1168

Comments

@Appeltabak
Copy link
Contributor

Kapacitor is unable to send alerts to Telegram when the option parseMode is set e.g. to markdown instead of Markdown:

[mbo_deadman:alert6] 2017/01/17 09:04:59 E! failed to send alert data to Telegram: parseMode markdown is not valid, please use 'Markdown' or 'HTML'

This occurred to me when using a template alert and template variables.

System info

Kapacitor 1.1.1 Official Docker image

@rossmcdonald
Copy link
Contributor

Looking at the Telegram API reference here, it seems like Telegram expects the exact text Markdown or HTML (case-sensitive). If that's not the case, it should be a very quick fix to update the check to be case in-sensitive:

https://github.com/influxdata/kapacitor/blob/master/services/telegram/service.go#L146

We would accept a PR if someone wants to verify that the parse_mode text is not case-sensitive.

@Appeltabak
Copy link
Contributor Author

I've tested this for both HTML and Markdown using random cased letters: the API is not case-sensitive:
selection_014

@rossmcdonald
Copy link
Contributor

@Appeltabak That's great. Would you like to submit a PR for that change? I can do it, if not.

@Appeltabak
Copy link
Contributor Author

@rossmcdonald Yes, I'll try to submit one today

@dgellow
Copy link

dgellow commented Feb 12, 2017

I can see that The PR #1168 has been approved. Is there a reason it hasn't been merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants