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

[FEATURE REQUEST] - MS Teams Adaptive Card Additional Configuration #4161

Open
mwasson74 opened this issue Dec 12, 2024 · 0 comments
Open

[FEATURE REQUEST] - MS Teams Adaptive Card Additional Configuration #4161

mwasson74 opened this issue Dec 12, 2024 · 0 comments

Comments

@mwasson74
Copy link

mwasson74 commented Dec 12, 2024

Problem Statement

We are being forced to transition from Slack Alerts to Microsoft Teams for notifications. Currently, the Adaptive Cards supported by AlertManager are limited to just "Title" and "Text." This restricts formatting options and makes it challenging to replicate the functionality and customization available in Slack's receiver configuration. As a result, creating effective and well-structured alerts for Teams requires overly complex/creative workarounds in the formatting that the go template produces.

Proposed Solution

Enhance the Adaptive Cards support in AlertManager with the following features:

  1. Clickable Titles: Allow the "Title" to be a hyperlink that redirects to the alert, similar to Slack's receiver configuration.
  2. Action Support: Add support for "actions," enabling users to include interactive buttons like those available in Slack's configuration.
  3. Flexible TextBlock Collections: Introduce the ability to configure a collection of "TextBlocks" in the alertmanager.yml receiver configuration. This would provide greater control over card formatting by allowing multiple sections or fields instead of a single "Title" and "Text."
  4. Additional Adaptive Card Features: Include a broader range of Adaptive Card capabilities, such as:
    • Custom layouts and dynamic fields (e.g., images, charts).
    • Advanced styling options (e.g., font sizes, colors, alignment).
    • Conditional formatting or visibility rules.
  5. Improved Configuration Support: Provide a simplified way to leverage these features directly in the alertmanager.yml file, making the experience intuitive for users.

Benefits

  • Streamlined Transition: Makes it easier to switch from Slack to Teams without losing customization and interactivity.
  • Improved Formatting: Enables better organization of information in alerts, enhancing readability and usability.
  • Enhanced User Experience: Facilitates rich, interactive notifications that can be tailored to specific workflows.
  • Reduced Complexity: Eliminates the need for overly creative or complex go templates to achieve desired layouts and functionality.

Additional Context

Using AlertManager version v0.28.0-rc.0, I’ve had to get creative with what my go templates produce to approximate the functionality that Slack’s receiver configuration provides by default. Improved Adaptive Card configurability would simplify this process significantly and bring parity to the Teams integration.

  1. Slack Alert Example:
    image

  2. Microsoft Teams Alert Example:
    image

To achieve the rendered Teams card, my go template produced the following strings:

"Title" String:

[FIRING:2] 🔥 [DEV][DSM] Monitoring_Exporter_Down [🔗](http://alertmanager-server01:9093/#/alerts?receiver=teams_monitoring_dev)

"Text" String:

\r\n1. 🚨 *_Exporter 'EURO-CUSTOM-RESULTS' @ 'DEV-US50APVP033' is down_*\r\n \r\n - Exporter 'EURO-CUSTOM-RESULTS' @ 'DEV-US50APVP033' has been down for more than 10 minutes.\r\n2. 🚨 *_Exporter 'LDAP-CONNECTION' @ 'DEV-US50APVP022' is down_*\r\n \r\n - Exporter 'LDAP-CONNECTION' @ 'DEV-US50APVP022' has been down for more than 10 minutes.\r\n \r\n [Dashboard 📊](https://monitoring-server01/d/000000014/windows-node-with-process-info?orgId=1&refresh=1m) [View Dashboard 🍻](https://monitoring-server01/d/000000014/windows-node-with-process-info?orgId=1&refresh=1m) [Silence 🔕](http://alertmanager-server01:9093/#/silences/new?filter=%7Bconfig%3D\"DEV\"%2C%20dc%3D\"DSM\"%2C%20send_to%3D\"teams\"%2C%20severity%3D\"critical\"%2C%20alertname%3D\"Monitoring_Exporter_Down\"%7D) [Source Metric 🔍](http://example.com/graph)

Thank you for considering this feature request!

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

No branches or pull requests

1 participant