0

I want to get notification when my azure function returns status 200. I have set up Alert and I am part of Action group that's supposed to receive alert.

Issue is, I am not getting alert. I checked Monitoring Graph for given signal aka HTTP 2XX, There also I see nothing.

I send this from code

            return func.HttpResponse(
                f"Total time took {time.time()-st}",
                status_code=200
            )

And My Azure portal looks like this azure portal screenshot

1 Answers1

0

I want to get notification when my azure function returns status 200. I have set up Alert and I am part of Action group that's supposed to receive alert.

I tried to create an notification alert for my function . When run my function if it returns 200 OK ,then it send me an mail notification of it.

Here are steps:

  • Created an function with http trigger and create alert from function app > Alert >Create alert and add condition and action group and email /phone details to receive an notification .

enter image description here

Here is the configurations based on your requirement

enter image description here

  • Settings inside alert in action added function :

enter image description here

  • Run my function app and returned 200 status:

enter image description here

Here is the email notifications:

enter image description here

enter image description here

For more information please refer this Blog & MS DOC .

AjayKumarGhose
  • 4,257
  • 2
  • 4
  • 15
  • Hello @AlmightyHeathcliff , Any update !! If the provided solution worked ,could you please accept the answer so as it would be beneficial for other community members and to the question shall stand answered. – AjayKumarGhose Nov 30 '21 at 05:43
  • Hey, Thanks. I didn't get chance to open SO, Thanks a lot for answering. Let me apply your solution, I'll do the needful. Thanks again – AlmightyHeathcliff Nov 30 '21 at 07:19
  • Hello @AlmightyHeathcliff , Did the solution worked ? Any update .Please let me know :) Thanks!! – AjayKumarGhose Dec 02 '21 at 12:23
  • Hi, Alert was Triggered but Email wasn't received, I'm looking into that. At least now I can see count in graph for statuscode 200 – AlmightyHeathcliff Dec 02 '21 at 21:49
  • Please make sure that you have add action type as Function . In my case i received email in 5 min. . Also please refer the Doc. that shared in answer. – AjayKumarGhose Dec 03 '21 at 03:38