Search code examples
azureazure-functionsazure-monitoringazure-alerts

How to configure Action Group on Azure Monitor Alert to use compilable (C# or F#) Azure Function


I was trying to figure out how to configure Action Group to use Azure Function. Documentation says that:

Calls an existing HTTP trigger endpoint in Azure Functions.

You may have a limited number of Function actions in an Action Group.

So what I tried already:

  • C# script file created on the portal - works
  • Powershell script created on the portal - works
  • Powershell script deployed to Azure Function - works
  • compiled Function App in C# deployed to Azure Function - doesn't work
  • compiled Function App in F# deployed to Azure Function - doesn't work

My preference is actually to use F# here and this is the reason why I'm trying to figure out (I know that I can use fsx and then it probably goes fine, however I want use compiled app and if it is not possible know why)

Each app I tested calling and endpoint from postman and each time it was fine. I tried also Function and Anonymous AuthorizationLevel.

And by saying that action doesn't work I mean following:

  • no evidence of calling that function (on Azure Function or App Insights)
  • no error or warning regardless the side

I also tried to configure a Webhook action by putting Azure Function endpoint but it also doesn't work. Did you understand why it is happening like this?


Solution

  • I figure out that and the issue was that in compilable version I didn't handle post verb. After adding it, all works as expected.