Is it possible to detect an table/queue/fileShare creation with eventGrid? - azure

In the MS documentation, at the resources of EventGrid Azure Blob Storage as event sources. There is nothing about table/queue/fileShare creations.
I saw also custom events in EventGrid, so i wondered if it is possible to use table/queue/fileShare creations as custom events. If yes, how?

Unfortunately, there is no direct way you can pass events like table/queue/fileshare creation to Event grid. Event grid supports mostly blob actions like what is listed HERE.
As a work around, you can look at is using alerts. Click on "Alerts" under the Monitoring tab on the left pane of your storage account. There are different types of actions available by which you can pass the administrative events to Azure functions, logic apps or webhooks. If you really need the events in Event grid, you can use logic apps/functions to pass those events/alerts to Event grid.
You may need to do some more filtering before doing this though to get exactly what you want. Else you may end up getting all the admin activities which I don't think you would need.
For example, what I setup below alerted me on creation and deletion of queues(among other things). I would also get alerts for List of storage keys and other admin activities.

Related

How to monitor for newly created Azure Subscriptions?

I want to monitor for newly created Azure Subscriptions. Ideally, I would like to subscribe to events at the management group level and ingest them on event grid. What would be the best way to accomplish this?
On my research there is no native way for event grid to subscribe to events on the Management Group or Tenant Level.
As you mentioned, there is no native way to add an event grid at management group level.
However, you can use a polling technique (Azure TimerTrigger Function) with a REST GET request to obtain a list of all subscriptions, comparing to previously state and publishing its diference to the AEG custom topic.

Trigger Azure Action Group from a Logic App

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.

Why to use Event grid for http trigger function?

I am designing Http trigger function. This function will be used to authenticate and to call an external API. Then get the response and pass it on to the caller(~in this case web application).
This function can be called thousand time/min(~during peak load).
I am going through event grids and having hard time deciding why to use it.
Microsoft says to safeguard your events so that it's not lost due to any reason I should use it along with my http trigger azure function.
I can very well design a queue trigger function which will process these requests in queue.
I am referring to this article of MS which says to use Event grid to gain more control on your serverless function for example:
MS Event Grid
I am going through event grids and having hard time deciding why to
use it.
I can very well design a queue trigger function which will process
these requests in queue.
I think this needs to be based on your needs. The event grid is discrete based on event triggers. And event grid has higher scalability.
If you use a queue trigger, it is not triggered based on an event, is it? All in all, it is not necessary to use event grid. Please refer to your use case for specific use.
If you want a comparison study of the messaging services you may refer to : https://tsuyoshiushio.medium.com/azure-messaging-service-in-a-picture-f8113cec54cd
https://hackernoon.com/azure-functions-choosing-between-queues-and-event-hubs-dac4157eee1c
For event grid, Azure Event Grid is an eventing service for the cloud. Azure Functions is one of the supported event handlers.
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. reference

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.

Is it possible to receive an event when a new resource is created

I would like to run some automation to take some actions whenever a new resource is created in One of my subscriptions in Azure. Is this possible?
You can use Azure Event grid for this, a solution that is built for exactly this purpose. Taken from https://learn.microsoft.com/en-us/azure/event-grid/overview
Azure Event Grid allows you to easily build applications with event-based architectures. You select the Azure resource you would like to subscribe to, and 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.
You basically create a subscription to a certain event (such as specific resources being created) that can then be picked up by a webhook, or processed by Azure Automation or Azure Functions

Resources