In the portal (manage.windowsazure.com) I created a metric for a healthcheck of my vm:
configure -> monitor -> endpoints -> "http://mysite.cloudapp.net/my-healthcheck".
Then I created a new alert rule, where I chose this metric with response time and entered a threshold of 10 seconds:
For testing, I stopped my frontend on this VM. As you can see in the picture below, the response time passed my threshold.
But everything is "green" - no alert is shown. What did I miss?
Edit:
additional information:
For testing I created an alertrule for CPU usage over 0.1% on the same machine: this works (I get an alert) - but it still doesn't work for my self-created metric (although the threshold is passed). And in the preview-portal I don't even see my metric when I try to create an alert rule. Is this a bug?
So just a little time after I started the bounty, I found a solution by myself:
I had to go to the new portal (preview portal) and create an Application Insights-ressource. There, I go to "Availability" and create a new "webtest". Here I can enter a specific URL for testing and the expected response code (e.g. 200). This works for me now!
So now I have to find out what the difference between the pricing tiers is (what does "days raw data retained", "data points included" and "aggregated data" mean in that case?)
Related
We are using Application Insights by Azure. At the moment I have to manually check the exceptions after each deployment to see if a new one appeared. Has anyone figured out a way to get notified (via Azure alert) once a new exception appears? For example, other error trackers like Sentry support this.
Example:
We did a deployment at 15:15
A previously unknown exception appears at 15:17
An email is sent to me with content "New exception X appeared in project Y"
Here is a screenshot demonstrating this a bit more clearly:
Smart detections are being replaced by alets. The only way to get notifications is to write a query that will see your new exceptions. Configure the period to let alerts activate.
Navigate to the Application insights resource on Azure Portal.
Select Logs under the Monitoring blade.
Construct your log query and check the results.
Click on + New alert rule.
Configure your alert as follows:
The above alert fires whenever the count of results in Custom log search log query for the last 1 day is greater than 0, and is evaluated every 6 hours. You can customize the Period and frequency as needed.
You can also run through this detailed guide for troubleshooting problems with Azure Monitor alerts. Please check if this helps.
You can try Smart Detection, specifically the alert for abnormal rise in exception volume.
When would I get this type of smart detection notification?
You get this type of notification if your app is showing an abnormal rise in the number of exceptions of a specific type, during a day. This number is compared to a baseline calculated over the previous seven days. Machine learning algorithms are used for detecting the rise in exception count, while taking into account a natural growth in your application usage.
If you never got a specificy exception before a release, I would consider that a rise in exceptions for that type and you should get an alert. Though the alert won't happen if there are very few exceptions occuring, and it won't be as detailed as you described in your question.
OK, so I simply want to create an alert, for when my URL is unreachable.
As a test, I followed the steps found here to create an availability test for https://www.google.com, and as success criteria, I put 500 as my HTTP response; it was felt that this will trigger an alert.
The action group that I created is an MS Teams group; this is working, I know this because it is used by different alerts. Then, I created a new Alert, with the Condition of my newly created availability test, then I waited.
I expected to get an alert upon failure of my test. I can see that the test is failing, but there is no alert. What might I [not be grasping/be doing wrong]?
Turns out I must have mistyped something. All I know is that doing it from scratch (for the 3rd time) fixed it.
I am using youtube data API and I didn't find anything related to the overall daily usage of API limit.
I can check the same on the console and I visited the below link but here I can only calculate the stats from the youtube web portal.
https://developers.google.com/youtube/v3/determine_quota_cost
Is there any means that I can get the overall daily usage of from any API provided by youtube.
Yes. Go to here, click on the menu in the top left corner, IAM & Admin and then Quotas.
Recently I had this requirement too. But then I moved on as it was not a blocker for me.
Alternatively I would suggest keeping track of quota units consumed. You can easily calculate how many quota units are consumed from the chart in the link you provided. You can get the number of quota units left by subtracting the sum of units consumed from 10000 (Current default limit, or any number assigned to your account if you requested for more).
The quota gets reset every midnight PST.
FYI, the api does respond with an HTTP 403 and error code 403 with reason = dailyLimitExceeded. Once you encounter this then you can stop sending out more api calls till midnight.
If you ever get to know of an API endpoint please update this question so that it helps people like us.
We have a few Azure functions that we expect to get hit at least once every working day. Looking through the alerts, I'm not seeing anything that is jumping out that would alert us if there is no activity for a function.
I haven't had much luck searching for 'alert when no activity' either, so I'm wondering if any of you folks have done this or might be able to point me in the right direction.
Thank you
Assume you have the following azure function, and it is connected an application insights:
Then you can use the query below to check if the function instance(BlobTrigger1 in this example) is called or not in Application insights(Note that the sdkVersion may change for v1 / v2 / v3 azure function, you should check it by yourself):
Then in Azure monitor -> alerts, for "RESOURCE", select your Application insights; for "CONDITION", select "Custom log search":
Then in "Custom log search", set the setting as per screenshot below:
And configure other settings, after that you will be alerted if the function instance is not called within 24 hours.
You should be able to build an alert using a custom condition with Number of Results = 0.
https://learn.microsoft.com/en-us/azure/azure-monitor/app/alerts#how-to-set-an-exception-alert-using-custom-log-search
E.g. you build a query for logs from your function within the last 24h. If your Function ran, the query will have results. If not, result count will be 0 and you fire your alert.
I've established an email alert inside azure. This alert listens to the response times of a specific azue function. If the average response time exceeds a threshold (e.g. 300ms), then the alert will be triggered and an email will be sent. If the average response time falls below the threshold a couple of minutes later, then a second email will be sent ("alert resolved")
Furthermore I established a suppress condition which suppresses the alert at night.
I've noticed that the second resolve-mail will still be sent at night (when the suppress condition is active). The first trigger-mail will not be send at night anymore.
I want that the second resolve-email will also be really suppressed at night. Does anybody have an idea?
The ideal way to suppress notifications for your alerts would be to use the Action Rules feature, which is currently in preview.
The best part about action rules is that you can define them at any scope: at the subscription, resource group, or individual resource level, with other available filters. While all actions and notifications on the selected scope and filters will be suppressed for the time period configured, alerts will continue to monitor.
As an example, the following action rule is configured to suppress alert notifications from 7 PM - 7AM every day.
Please give it a try and see if it fits your need. More about this here. Hope this helps!