Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [Datadog] Add optional `datadog_api_url` parameter to support regional Datadog sites (US3, US5, EU1, AP1, etc.) - [#1754](https://github.com/jertel/elastalert2/pull/1754) - @BillyWeans

## Other changes
- None
- Remove MS Teams Alerter - [#1757](https://github.com/jertel/elastalert2/pull/1757) - @nsano-rururu

# 2.29.0

Expand Down
92 changes: 0 additions & 92 deletions docs/source/alerts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ or
- line
- matrixhookshot
- mattermost
- ms_teams
- ms_power_automate
- opsgenie
- pagerduty
Expand Down Expand Up @@ -1633,97 +1632,6 @@ Example mattermost_attach_opensearch_discover_url, mattermost_kibana_discover_co
mattermost_opensearch_discover_title: "Discover in opensearch"


Microsoft Teams
~~~~~~~~~~~~~~~

Microsoft Teams alerter will send a notification to a predefined Microsoft Teams channel.

The alerter requires the following options:

``ms_teams_webhook_url``: The webhook URL that includes your auth data and the ID of the channel you want to post to. Go to the Connectors
menu in your channel and configure an Incoming Webhook, then copy the resulting URL. You can use a list of URLs to send to multiple channels.

Optional:

``ms_teams_alert_summary``: MS Teams use this value for notification title, defaults to `Alert Subject <https://elastalert2.readthedocs.io/en/latest/ruletypes.html#alert-subject>`_. You can set this value with arbitrary text if you don't want to use the default.

``ms_teams_theme_color``: By default the alert will be posted without any color line. To add color, set this attribute to a HTML color value e.g. ``#ff0000`` for red.

``ms_teams_proxy``: By default ElastAlert 2 will not use a network proxy to send notifications to MS Teams. Set this option using ``hostname:port`` if you need to use a proxy. only supports https.

``ms_teams_alert_fixed_width``: By default this is ``False`` and the notification will be sent to MS Teams as-is. Teams supports a partial Markdown implementation, which means asterisk, underscore and other characters may be interpreted as Markdown. Currently, Teams does not fully implement code blocks. Setting this attribute to ``True`` will enable line by line code blocks. It is recommended to enable this to get clearer notifications in Teams.

``ms_teams_alert_facts``: You can add additional facts to your MS Teams alerts using this field. Specify the title using `name` and a value for the field or arbitrary text using `value`.

Example ms_teams_alert_facts::

ms_teams_alert_facts:
- name: Host
value: monitor.host
- name: Status
value: monitor.status
- name: What to do
value: Page your boss

``ms_teams_attach_kibana_discover_url``: Enables the attachment of the ``kibana_discover_url`` to the MS Teams notification. The config ``generate_kibana_discover_url`` must also be ``True`` in order to generate the url. Defaults to ``False``.

``ms_teams_kibana_discover_title``: The title of the Kibana Discover url attachment. Defaults to ``Discover in Kibana``.

``ms_teams_attach_opensearch_discover_url``: Enables the attachment of the ``opensearch_discover_url`` to the MS Teams notification. The config ``generate_opensearch_discover_url`` must also be ``True`` in order to generate the url. Defaults to ``False``.

``ms_teams_opensearch_discover_title``: The title of the Opensearch Discover url attachment. Defaults to ``Discover in opensearch``.

Example ms_teams_attach_kibana_discover_url, ms_teams_kibana_discover_title::

# (Required)
generate_kibana_discover_url: True
kibana_discover_app_url: "http://localhost:5601/app/discover#/"
kibana_discover_index_pattern_id: "4babf380-c3b1-11eb-b616-1b59c2feec54"
kibana_discover_version: "7.15"

# (Optional)
kibana_discover_from_timedelta:
minutes: 10
kibana_discover_to_timedelta:
minutes: 10

# (Required)
ms_teams_attach_kibana_discover_url: True

# (Optional)
ms_teams_kibana_discover_title: "Discover in Kibana"

Example ms_teams_attach_opensearch_discover_url, ms_teams_opensearch_discover_title::

# (Required)
generate_opensearch_discover_url: True
opensearch_discover_app_url: "http://localhost:5601/app/discover#/"
opensearch_discover_index_pattern_id: "4babf380-c3b1-11eb-b616-1b59c2feec54"
opensearch_discover_version: "7.15"

# (Optional)
opensearch_discover_from_timedelta:
minutes: 10
opensearch_discover_to_timedelta:
minutes: 10

# (Required)
ms_teams_attach_opensearch_discover_url: True

# (Optional)
ms_teams_opensearch_discover_title: "Discover in opensearch"

``ms_teams_ca_certs``: Set this option to ``True`` or a path to a CA cert bundle or directory (eg: ``/etc/ssl/certs/ca-certificates.crt``) to validate the SSL certificate.

``ms_teams_ignore_ssl_errors``: By default ElastAlert 2 will verify SSL certificate. Set this option to ``True`` if you want to ignore SSL errors.

Example usage::

alert:
- "ms_teams"
ms_teams_theme_color: "#6600ff"
ms_teams_webhook_url: "MS Teams Webhook URL"

Microsoft Power Automate
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 0 additions & 1 deletion docs/source/elastalert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Currently, we have support built in for these alert types:
- LINE Messaging API
- Matrix Hookshot
- Mattermost
- Microsoft Teams
- Microsoft Power Automate
- OpsGenie
- PagerDuty
Expand Down
120 changes: 0 additions & 120 deletions elastalert/alerters/teams.py

This file was deleted.

2 changes: 0 additions & 2 deletions elastalert/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from elastalert.alerters.smseagle import SMSEagleAlerter
from elastalert.alerters.sns import SnsAlerter
from elastalert.alerters.sqs import SqsAlerter
from elastalert.alerters.teams import MsTeamsAlerter
from elastalert.alerters.powerautomate import MsPowerAutomateAlerter
from elastalert.alerters.yzj import YzjAlerter
from elastalert.alerters.zabbix import ZabbixAlerter
Expand Down Expand Up @@ -117,7 +116,6 @@ class RulesLoader(object):
'command': elastalert.alerters.command.CommandAlerter,
'sns': SnsAlerter,
'sqs': SqsAlerter,
'ms_teams': MsTeamsAlerter,
'ms_power_automate': MsPowerAutomateAlerter,
'slack': SlackAlerter,
Comment on lines 116 to 120
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the ms_teams entry from alerts_mapping means existing rules will now fall back to get_module('ms_teams'), which will likely fail with an ImportError-style message that doesn’t clearly explain that the built-in MS Teams alerter was removed. Consider adding an explicit guard (e.g., special-casing ms_teams in create_alert) to raise an EAException with a clear migration hint (like using ms_power_automate).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was an outdated alerter remaining, and I had previously received inquiries about it not working, so I advised using the newer alerter. Therefore, I will be deleting it.

'mattermost': MattermostAlerter,
Expand Down
27 changes: 0 additions & 27 deletions elastalert/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,13 @@ definitions:
type: array
items: *slackField

msTeamsFact: &msTeamsFact
type: object
additionalProperties: false
properties:
name: {type: string}
value: {type: string}

msPowerAutomateFact: &msPowerAutomateFact
type: object
additionalProperties: false
properties:
name: {type: string}
value: {type: string}

arrayOfMsTeamsFacts: &arrayOfMsTeamsFacts
type: array
items: *msTeamsFact

arrayOfMsPowerAutomateFacts: &arrayOfMsPowerAutomateFacts
type: array
items: *msPowerAutomateFact
Expand Down Expand Up @@ -711,22 +700,6 @@ properties:
mattermost_opensearch_discover_color: {type: string}
mattermost_opensearch_discover_title: {type: string}


### Microsoft Teams
ms_teams_webhook_url: *arrayOfString
ms_teams_alert_summary: {type: string}
ms_teams_theme_color: {type: string}
ms_teams_proxy: {type: string}
ms_teams_alert_fixed_width: {type: boolean}
ms_teams_alert_facts: *arrayOfMsTeamsFacts
ms_teams_attach_kibana_discover_url: {type: boolean}
ms_teams_kibana_discover_title: {type: string}
ms_teams_ca_certs: {type: [boolean, string]}
ms_teams_ignore_ssl_errors: {type: boolean}
ms_teams_attach_opensearch_discover_url: {type: boolean}
ms_teams_opensearch_discover_title: {type: string}


### Microsoft Power Automate
ms_power_automate_webhook_url: *arrayOfString
ms_power_automate_webhook_url_from_field: { type: string }
Expand Down
Loading