inCaller / prometheus_bot

Telegram bot for prometheus alerting
MIT License
395 stars 182 forks source link

prometheus_bot fails when message too long #29

Closed strangeman closed 6 years ago

strangeman commented 6 years ago

In some cases, we have very long alert message (for example, we have alert for underreplicated kafka topics, grouped by instance, and entire instance with 40 topics was failed). When prometheus_bot tries to send the similar message - it fails and flood the channel with Error sending message, checkout logs messages.

Telegram API have message length limit - 4096 UTF8 characters (https://core.telegram.org/method/messages.sendMessage). Looks like your bot doesn't check message length.

hryamzik commented 6 years ago

Hi @strangeman, I believe that was already implemented in one of forks. Didn't read it carefully but if you decide to make a PR that may be a good starting point. I'll be happy to merge it.

strangeman commented 6 years ago

Ok, I'll check them and adopt changes to my PR

strangeman commented 6 years ago

PR was merged, I'm closing issue.