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?
Related
How can I make a single tile 1x1 with a single metric in it?
Some of the default tiles that come with the dashboard show a single metric such has user count. How can I make my own metric that is shown?
Eg, number of exceptions?
Something like this?
How can I make my own metric that is shown?
You can create your own metric like Requests, Number of Exceptions, and others in Application Insights and pin them to Dashboard by following the steps below:
In the Application Insights resource deployed on Azure Portal--> under Monitoring --> Logs --> write your custom query in Kusto.
After running the above query, you will get the results and you can select the type of chart to use and pin that to the dashboard.
Refer this link to know complete information step by step about Creating Custom Tiles In Microsoft Azure Application Insights.
is it possible to create custom json payload for metric alerts like the way we create for log alert and log analytics alerts.If it is there is there any documentation i can refer to ,to create alerts with custom json payload
Yes, It is possible to use a pre-written JSON and change it according to our context even for metric alerts. You can also deploy the JSON with ARM using any deployment method.
There are sample ARM Template for both static and dynamic instances given in Microsoft docs for reference :
https://learn.microsoft.com/en-us/azure/azure-monitor/platform/alerts-metric-logs#configuring-metric-alert-for-logs
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.
I'm trying to figure out how I can set up Email/Text alerts for custom requests inside application insights.
I have a number of different custom requests that are uniquely identified by a property in application insights. I can filter on these properties in the Metrics Explorer and even create graphs of the server response time for these specific requests. However I cant figure out how to set an alert if the server response time (for this individual custom request) goes over a certain threshold.
I've tried added a new metric alert rule but the only Metric that is relevant in the drop down in Server Response Time but there appears to be no way to specify this to a specific type of request as identified by a property on the request.
Would anyone know if this is currently possible in application insights and possibly be able to point me in the right direction.
Thanks for your help.
There are two options:
1) Call TrackMetric (provide some metric name) when particular request happens. Then configure alert based on this metric.
2) Write a tool/service/azure function which every few minutes runs a query in Application Insights Analytics and posts result as metric (using TrackMetric). Then configure alert from portal.
Right now AI team is working on providing #2 out of the box.
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.