I'm using google cloud tracing. It's recording the time my API's take to execute - which is working well.
Is it possible to setup explicit monitoring on that using google cloud monitoring? IE, setup a notification if I go over a threshold?
You can create a custom metric and use it to create a alerting policies.
After you got the custom metric created. The policy can be created with the following parameters:
resource type: Custom metric.
If Metric: the metric you created.
Condition: above.
Threshold: whatever you estimate will need to trigger the alert.
Related
Let's say I have a custom metric on Azure Application Insights. These custom metric does not seem to exist until it receives the log/data with the metrics. So when I try to deploy alert rules that are based on these custom metrics, the Bicep deployment will fail saying the metric does not exist.
Is there a workaround to this issue? I would like to not have to send dummy data just to create the custom metric first. Or is there something I'm missing or doing wrong?
Usecase: Trigger Azure Function only for predefined Azure activity logs.
I tried to configure Azure Activity logs and Export to Event Hub, but it won't allow Filter set on it. As per Azure document, the filter settings do not have an impact on export settings.
My usecase is to trigger an Azure Function only for a specific set of activity logs (say VM, VNet, NSG Create/Delete/Modify). What other Azure services can I use to accomplish this?
One option, but with some constraints, is to create Alerts at Resource Group level or even for specific resources. Alerts provide some flexibility in filtering specific events for which you would want to trigger an Action, say an Azure Func in your case.
I was thinking Azure Logic Apps would do this as well. However, to my surprise I could not find an option to add Activity Log as a trigger. Probably, it would come in the future. As Azure is updated quite frequently, keep checking every now and then to see if you get any new options to do this.
Hi I'm trying to find information on how an azure function running on a consumption plan would scale with a custom trigger. This article - https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#how-the-consumption-plan-works - seems to imply theres a custom scaling implementation per trigger and does not have any explanation of how that works with custom triggers (if at all).
Custom triggers are not supported for Azure Functions. I think the main reason for that is indeed lack of Scaling Controller hooks.
Based on what is done in Durable Functions, you might be able to define your own triggers which are based on other existing triggers (like Orchestration Trigger is based on Storage Queues) to add your specific semantics, but reuse the scaling logic.
I need to set an alert on custom metric in Application Insights. For testing, I sent custom metric from a console app and then in Azure portal, set the alert on that custom metric. but when we will move the app to production, how we can make it work. I assume , during installation, we will need to set the alerts but I will be sending the custom metric through my application, so how I will set alert on that metric in the beginning which does not exists yet.
There's a current limitation that you have to send a value for the metric at least once, to cause it to be a "known" / "valid" metric name to create an alert for.
John is correct. This is a desired behavior aimed at preventing customers from making an error when specifying the name of a metric and thus configuring and relying on an alert that will never fire.
I've recently been playing around with the Bing's image search api, however I have a concern I hope to resolve.
It is to do with the limit on the number of api requests that are allowed per month. After doing some reading it seems like if I were to exceed this limit, my Azure account would be billed depending on the number of api calls I have gone over my limit. Is it possible to set up some kind of alert through the Azure management portal that will stop the api from processing any more calls once a specific threshold has been passed?
If anyone has any experience using the Search api and can enlighten me, that would be great.
Try Metrics Monitoring. Go to the service within Azure Portal, Scroll Down to Monitoring -> Metrics and then click Add Metric Alert.
You can create an alert based on the number of successful calls or total calls and the alert can notify you via e-mail. Additionally, if you want to take action automatically after reaching the threshold, you can use Webhooks to make a call out to a web application or Azure Automation Runbook to automatically run PowerShell scripts or some code to prevent overuse. You can also use Logic Apps for that. Check the following link for further details and examples at the end of the page:
https://learn.microsoft.com/en-us/azure/monitoring-and-diagnostics/insights-webhooks-alerts