Microsoft Power Automate
Kick off low-code automation when OpenSearch rules fire by POSTing to a Power Automate HTTP trigger. Configure ms_power_automate with the generated request URL and payload options. Add ms_power_automate under alert: on your rule (you can combine destinations).
Use Options for key-by-key reference, then Full working example for copy-paste YAML you can tailor to your stack.
Options
Keys below match the ElastAlert 2 alerter. Shared rule fields such as alert_subject apply as described in Subject & body. Example fragments from the ElastAlert 2 reference appear indented under the option they illustrate (add your own name, type, index, and filter to make a full rule).
Required
-
ms_power_automate_webhook_url— The webhook URL provided in Power Automate, doc Microsoft. After creating the flow select your Teams channel under "Send each adaptive card". You can use a list of URLs to send to multiple channels. -
ms_power_automate_webhook_url_from_field— Use a field from the document that triggered the alert as the webhook. If the field cannot be found, thems_power_automate_webhook_urlvalue will be used as a default.
Optional
-
ms_power_automate_summary_text_size— By default, is set to the valuelarge. This field supports the values, default, small, medium and extraLarge. -
ms_power_automate_body_text_size— By default, this field is not set, and has the default behavior in MS Power Automate. This field supports the values, default, small, medium, large and extraLarge. -
ms_power_automate_alert_summary— Microsoft Power Automate use this value for notification title, defaults to alert_subject. You can set this value with arbitrary text if you don't want to use the default. -
ms_power_automate_proxy— By default ElastAlert 2 will not use a network proxy to send notifications to MS Teams. Set this option usinghostname:portif you need to use a proxy. only supports https. -
ms_power_automate_teams_card_width_full— By default, this isFalseand the notification will be sent to MS Teams without rendering full width in Microsoft Teams. Setting this attribute toTruewill render the alert in full width. doc feature. -
ms_power_automate_alert_facts— You can add additional facts to your MS Teams alerts using this field. Specify the title usingnameand a value for the field or arbitrary text usingvalue.
Example ms_power_automate_alert_facts
ms_power_automate_alert_facts:
- name: Team
value: Teste
- name: Level
value: Criticalms_power_automate_kibana_discover_attach_url— Enables the attachment of thekibana_discover_urlto the MS Power Automate notification. The configgenerate_kibana_discover_urlmust also beTruein order to generate the url. Defaults toFalse.
Example ms_power_automate_kibana_discover_attach_url, ms_power_automate_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: "8.13"
# (Optional)
kibana_discover_from_timedelta:
minutes: 10
kibana_discover_to_timedelta:
minutes: 10
# (Required)
ms_power_automate_kibana_discover_attach_url: True
# (Optional)
ms_power_automate_kibana_discover_title: "Discover in Kibana"Example usage
ms_power_automate_kibana_discover_attach_url: true
ms_power_automate_kibana_discover_title: "See More"
ms_power_automate_kibana_discover_color: 'destructive'
ms_power_automate_teams_card_width_full: true
ms_power_automate_alert_facts:
- name: Team
value: Teste
- name: Level
value: Critical
alert:
- ms_power_automate
ms_power_automate_webhook_url: >-
webhook-
ms_power_automate_kibana_discover_title— The title of the Kibana Discover url attachment. Defaults toDiscover in Kibana. -
ms_power_automate_kibana_discover_color— By default, the alert will be published with thedefaulttype blue if not specified. If set topositive, action is displayed with a positive style (typically the button becomes accent color), If set todestructive, Action is displayed with a destructive style (typically the button becomes red) -
ms_power_automate_opensearch_discover_attach_url— Enables the attachment of theopensearch_discover_urlto the MS Teams notification. The configgenerate_opensearch_discover_urlmust also beTruein order to generate the url. Defaults toFalse.
Example ms_power_automate_opensearch_discover_attach_url, ms_power_automate_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_power_automate_opensearch_discover_attach_url: True
# (Optional)
ms_power_automate_opensearch_discover_title: "Discover in opensearch"-
ms_power_automate_opensearch_discover_title— The title of the Opensearch Discover url attachment. Defaults toDiscover in opensearch. -
ms_power_automate_opensearch_discover_color— By default, the alert will be published with thedefaulttype blue if not specified. If set topositive, action is displayed with a positive style (typically the button becomes accent color), If set todestructive, Action is displayed with a destructive style (typically the button becomes red) -
ms_power_automate_ca_certs— Set this option toTrueor a path to a CA cert bundle or directory (eg:/etc/ssl/certs/ca-certificates.crt) to validate the SSL certificate. -
ms_power_automate_ignore_ssl_errors— By default ElastAlert 2 will verify SSL certificate. Set this option toTrueif you want to ignore SSL errors.
Full working example
name: Example alert for Microsoft Power Automate
type: any
index: "*-*"
filter:
- query:
query_string:
query: "level:error OR log.level:error"
alert:
- "ms_power_automate"
ms_power_automate_webhook_url: "https://default..."