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

feat: trigger description to telegram alerts #1075

Conversation

AleksandrMatsko
Copy link
Member

@AleksandrMatsko AleksandrMatsko commented Aug 27, 2024

Add formatted description to telegram sender

Description is formatted with html.

Sender will try to include trigger description to telegram alert. But if one of this conditions is satisfied it can be replaced with other text:

  • if characters count of message is greater than telegram limits and/or total characters count (with html tags) is greater than telegram limits, then the description will be replaced with: Description is too long for telegram sender.
  • if first attemt of sending alert failed because of message formatting reasons, then the description will be replaced with: Bad trigger description for telegram sender. Please check trigger.

Closes #353

@AleksandrMatsko AleksandrMatsko marked this pull request as ready for review August 27, 2024 08:51
@AleksandrMatsko AleksandrMatsko requested a review from a team as a code owner August 27, 2024 08:51
senders/telegram/send.go Outdated Show resolved Hide resolved
almostinf
almostinf previously approved these changes Aug 30, 2024
almostinf
almostinf previously approved these changes Aug 30, 2024
@AleksandrMatsko
Copy link
Member Author

/build

senders/slack/slack.go Outdated Show resolved Hide resolved
senders/telegram/send.go Outdated Show resolved Hide resolved
@AleksandrMatsko AleksandrMatsko merged commit a8c5b00 into moira-alert:master Sep 5, 2024
5 checks passed
Copy link

github-actions bot commented Sep 5, 2024

Build and push Docker images with tag: 2024-09-05.a8c5b00

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

Successfully merging this pull request may close these issues.

Markdown descriptions in senders
3 participants