Alerts using stream analytics or EventGrid?

Sagar Epari 130 Reputation points
2023-06-13T13:07:18.25+00:00

We are planning to use stream analytics to connect it to PowerBI. Also for the cold path we will store the telemetry data in a database.
To add alerts (emails for example) - Is it good to have a separate path (through EventGrids->LogicApp) or should we use stream analytics to create alerts?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. LeelaRajeshSayana-MSFT 17,766 Reputation points Moderator
    2023-06-13T19:36:48.6166667+00:00

    Hi @Sagar Epari Greetings! Thank you for posting this question on this forum.

    As far I can tell, Azure Stream Analytics does not have a built-in capability to send email alerts. You can use either Event Hub approach you pointed or use Azure Functions. Please refer the below architecture you may follow to achieve the use case you are looking for.

    User's image

    I prefer Azure functions approach as it is easier to integrate and come up with a solution. You can refer the QuickStart How to send an email using Azure Communication Service which provides a sample code on how you can send an email alert from Azure Function. Once you have the Azure Function created, you can follow the steps under the section Update the Stream Analytics job with the function as output to bind the stream analytics output to Azure Function.

    Once your stream analytics job is configured to pushes the alert data, you can receive email alerts through your Azure Function.

    Hope this answers your question. Please let me know if you need any additional information or further assistance.


    If the response helped, please do click Accept Answer and Yes . Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Wilko van de Velde 2,236 Reputation points
    2023-06-14T13:24:56.6166667+00:00

    When your using Azure Data Explorer(ADX) as a database, you may create alerts based on the ADX telemetry.

    More information:
    https://techcommunity.microsoft.com/t5/azure-data-explorer-blog/what-s-new-in-kusto-build-2023/ba-p/3829467 (bullet 5)

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.