Trigger Azure Action Group from a Logic App - azure

I have a Logic App running every minute that checks the time that data was last received in a table. If it has been enough time since the data was updated I want to receive an alert. I really like the Action Groups used by the Alerts in Azure. They are clean and have lots of options like email, SMS, and Phone. How can I trigger an Action Group from my Logic App?
I know I can recreate the email, SMS, and Phone connections in the Logic App, but then it's harder to maintain. I'm already using the same Action Group for other Alerts. It would be easier to maintain if I could reuse this Action Group.
There is ton online about triggering a Logic App from an Action Group. This is NOT what I'm trying to do. I want the reverse. I want to trigger an Action Group from a Logic App.

How can I trigger an Action Group from my Logic App?
Currently as per the documentation We can trigger a particular logic app using the action group but there is no way to trigger a particular action group using logic app.
It would be easier to maintain if I could reuse this Action Group.
Yes, you can use same action group in multiple alert mechanisms.
Would suggest you to raise a feature request using this azure support link.

You should be able to send data to a custom log in Log Analytics from your Logic App using Azure Log Analytics Data Collector.
Then you can use a Log Analytics query to evaluate resources logs every set frequency, and fire an alert based on the results. Rules can trigger one or more actions using Action Groups. - see Create, view, and manage log alerts using Azure Monitor.

Related

Automatically link newly created logic apps to an existing alert rule

I have created an Alert action group which will simply call a "error" logic app when the conditions are met. And I have set up an event grid which will be called whenever an logic app gets created for the first time.
Now the challenge is that I want to somehow automatically link this newly created logic app to the action group.
I have searched for way to do this but had no luck, anyone knows if this is possible?
One way of updating an action group would be by using the management API, see the docs.
However, you might want to think about this a bit differently.
How are you going to deploy everything?
Assuming you're not going to be doing this manually, you will be using ARM-/Bicep-files. So, you could include the configuration of an action group in these deployment files.
Meaning, when you initially deploy the Logic App, it will immediately be added to an action group, allowing it to trigger the required alerts. Next to that, it also allows you to create the event subscriptions in your Azure Event Grid topic.
This way you avoid missing the first alert because the action group wasn't updated before the first run of the Logic App.
The template to create an action group can be found here.
The template to create an event grid subscription can be found here.

Trigger Azure logic app on resource creation

I'm working on an Azure Logic app that should trigger when a new resource is created.
However, if I trigger the app based on a webhook using monitor alerts or an event subscription, I run into the problem of each creation event will have 2 identical events with all the output being identical which means I can't filter it out and therefore triggers the logic app twice.
If there a different route around to just get the app to trigger once?
I believe the multiple events are because the event type for both create or update is the same as documented.
One way to workaround this would be to keep track of resourceIds touched by your Logic App, OR add a tag to your resource which signals that it has been touched. This way you wouldn't need an extra store for this metadata.

Is there a way to trigger a Logic App on a deletion of a record in an Azure SQL table?

Is there a way to trigger a Logic App on a deletion of a record in an Azure SQL table?
I've checked the SQL Connector and there is only When an item is created and When an item is modified, which gives me the C and U in CRUD, but sadly there isn't an out-of-the-box trigger for the D.
I can think of some awful way of polling to get record deletions, but I'm hoping that there is a cleaner solution that some bright person has come up with, however I've had no joy with the Google searching.
I would look at the Azure Event Grid. Azure Event Grid allows you to easily build applications with event-based architectures. First, select the Azure resource you would like to subscribe to, and then give the event handler or WebHook endpoint to send the event to. Event Grid has built-in support for events coming from Azure services, like storage blobs and resource groups. Event Grid also has support for your own events, using custom topics.
I would suggest monitoring the resource group and triggering it off the deletion from the RG. There is a tutorial that shows this same concept with a VM but you should be able to modify it to meet your needs with an Azure SQL DB.
https://learn.microsoft.com/en-us/azure/event-grid/monitor-virtual-machine-changes-event-grid-logic-app
I added an on delete trigger which adds the id of the deleted record to a secondary table. I have the logic app look for modifications on the secondary table.

How do I change the Azure Logic App Frequency and Request type

How do I change the Azure Logic App Frequency and Request type (Not programmatic ally)
Frequncy and Request type
Thank you for providing a screenshot! So the REQUEST and FREQUENCY info that you're seeing on the Overview section relate to the specific Trigger that you're using in your Logic App. Different triggers will show different info here depending on how they're designed to operate & work.
In your case, it looks like you're using one of Logic Apps' built-in connector called Request which will trigger workflow in your Logic Apps whenever a request is received to its endpoint hence manual and on-demand.
To change this trigger, navigate to Logic Apps Designer view under DEVELOPMENT TOOLS in the Azure Portal as shown below:
Moreover, I recommend reading Logic Apps' documentation here and finding more about triggers and actions; overall concepts behand Logic Apps. Hope this helps and goodluck with your journey on Logic Apps!

Get custom events in schedule function azure app insights

I have to get all custom events that contain certain string on the name, with a scheduled Azure function.
Ideally I would like to send an email if a specific custom event have some wrong data.
The built in alerting features don't let you do this (run an arbitrary query and alert if some specific condition)
However, a lot of people are using Microsoft Flow, and there's some example scenarios there.
Other people have created azure functions to do similar.

Resources