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

Rebuild Teams Alerting to be able to create AdaptiveCards instead of ConnectorCards #1404

Open
FrankTub opened this issue Feb 9, 2024 · 0 comments
Labels

Comments

@FrankTub
Copy link

FrankTub commented Feb 9, 2024

Is your feature request related to a problem? Please describe.

In #1397 a very basic implementation of a connection with a MS Teams webhook is introduced so elementary alerts could be sent to a Microsoft Teams Channel. It uses pymsteams to create this connection with MS Teams. This package is very limited in formatting messages and it's use cases in terms of what messages it can create.

The formatting could be implemented a lot easier if another kind of package is used, for example msteams_webhook. Since this package is not deployed on pypi I think it would be best to implement pieces of the code they have in this repo. Another option would be to take a look at pyadaptivecards or adaptive-cards-py.

Describe the solution you'd like

Modify elementary/clients/teams/client.py to something like this.

Modify elementary/monitor/data_monitoring/alerts/integrations/teams/message_builder.py to something like the AdaptiveCard as placed in here.

Then the combination of these should be implemented in elementary/monitor/data_monitoring/alerts/integrations/teams/teams.py.

Describe alternatives you've considered
N/A

Additional context

Implementing the Adaptivecard in this project allows for more flexible ways of formatting the message that is sent to MS Teams. This could also have the added advantage that if a new type of Teams client is created (MS Teams bot?) it could reuse the AdaptiveCard and the way the message is formatted and sent.

This opens the door for mentions in the MS Teams alerting, see for more info this. I will open a new ticket for this.

Not entirely sure but it could be a possibility to use edr send-report to MS Teams when an AdaptiveCard is used instead of a ConnectionCard.

Would you be willing to contribute this feature?

Don't expect to have any time available for it anytime soon. Testing the new setup is something I would do.

@FrankTub FrankTub changed the title Rebuild Teams Alerting to use something similar as in https://github.com/decoupca/msteams_webhooks Rebuild Teams Alerting to be able to create AdaptiveCards instead of ConnectionCards Feb 9, 2024
@FrankTub FrankTub changed the title Rebuild Teams Alerting to be able to create AdaptiveCards instead of ConnectionCards Rebuild Teams Alerting to be able to create AdaptiveCards instead of ConnectorCards Feb 9, 2024
@haritamar haritamar added integration Alerts Created by Linear-GitHub Sync and removed Triage 👀 labels May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants