I am trying to schedule my azure alerts , which runs for every five minutes by query and if condition met, it triggers an email via action group.
what my requirement is to stop email alerts on weekends, I have tried azure action processing rules but it is not working at all.
where am I wrong couldn't figure it out, can anyone suggest that which approach would be better and how to do that and does action processing rules works?
To suppress notifications for your alerts would be to use the Alert Processing Rules feature, which is currently in preview.
The Alert processing rules that modify the fired alerts themselves as they are being fired. You can use alert processing rules to add action groups or remove (suppress) action groups from your fired alerts. In your requirement you could use Suppress.
Suppress approach has some limitations:
You could disable the relevant alert rule at the beginning of the
maintenance window. Once the maintenance is over, you can then
re-enable the alert rule. However, this approach is only practical if
the scope of the alert rule is exactly the scope of the resources
under maintenance. For example, a single alert rule might cover
multiple resources, but only one of those resources is going through
maintenance. So, if you disable the alert rule, you will miss valid
alerts on the remaining resources covered by that rule.
You may have many alert rules that cover the resource. Updating all
of them is time consuming and error prone.
You might have some alerts that are not created by an alert rule at
all. In all these cases, an alert processing rule provides an easy
way to achieve the notification suppression goal.
You can add your Suppression alert rule to disable the notification. I have disabled the Email Notification on weekends which follows
Refer Document for more information
Related
I want to trigger the alerts that i have configured for a system manually, we don't have access to the infrastructural design of the system.
Azure Monitor only allows you to manually create alerts that will notify you when a metric crosses a predefined threshold.
you’ll be able to add a condition to trigger the alert and can set the threshold you’d like to alert on but we cannot trigger an azure monitoring alert manually.
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.
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.
I have implemented an Azure alert that should fire when a Application Insights metric is greater than zero. The metric is the number of items in a Azure poison queue. The metric is calculated by a Azure Function described in this article: https://www.scaling-to-the-sky.com/2018/03/08/poison-queue-monitoring-with-azure-functions/?unapproved=160&moderation-hash=072116753136d2008f5e63a856d8e4b0#comment-160.
The alert has only fired once despite the condition being met on several occasions. I don't know why it doesn't fire. I have noticed that on the one alert that was fired the monitor condition has never changed from "Fired" to "Resolved". Maybe that is the reason why no need new alerts are fired? If that is the case then how do I change the state of the alert monitor condition?
A metric alert that's in a "Fired" state would not trigger again until it's resolved. This is done to reduce noise. Resolution happens automatically after 3 healthy evaluations of your condition (evaluations where the condition isn't breached), and there's no way to manually change the monitor condition to "Resolved".
Can you please confirm if you are sending a metric value on every evaluation of the poison queue, even if the value is 0?
Metric alerts are stateful by default, so other alerts aren't fired if there's already a fired alert on a specific time series.
To make a specific metric alert rule stateless and get alerted on every evaluation1 in which the alert condition is met, use one of these options:
If you create the alert rule programmatically, for example, via Azure Resource Manager, PowerShell, REST, or the Azure CLI, set the autoMitigate property to False.
If you create the alert rule via the Azure portal, clear the Automatically resolve alerts option under the Alert rule details section.
Check out the details here:
Make metric alerts occur every time my condition is met
If I turn on auto heal in kudu mitigate without adding rules, does Azure do any Auto-auto healing on its own? (Ie PaaS magic)
I mean, is there any default stuff Azure does without me explicitly telling it what to do based on rules?
According to this documentation, we could find how the “Auto Healing” feature works:
You simply define the triggers in the root web.config file of your web site and configure the actions to be performed when these triggers are hit.
In my view, if we do not define the triggers/rules, no triggers will be triggered when certain events occur and no action will be taken.