0
votes

According to https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-cross-workspace-search we can now perform cross-resource queries in Azure Log Analytics. We've created a sample query that works fine in Log Analytics:

app("appInsightName1").requests

but when providing the same query to Monitor -> Alerts -> Rules -> Define Alert Condition -> Configure signal logic / Search query it shows an error in tooltip Query syntax error.

All other queries that do not refer to app() function works fine. We tried different methods of specifying application id passed to app() function, but with no success.

It there any limitation for Monitor queries regarding cross-resource requests? How can we create an alert based on application insight events?

1
From what I've googled so far, this looks to be a known issue - techcommunity.microsoft.com/t5/Azure-Log-Analytics/…. Unfortunately, right now alerts do not yet support cross-Application Insights-Log Analytics alerts. It is something that is on their backlog, but without firm ETAs yet.Roman

1 Answers

1
votes

It looks like, when you are trying to create new alert from Monitor resource, you would have missed to add the ‘Application Insights’ resource type under the resource column and didn't add the correct Application Insights name under it. Please double check.

You may check for it in Azure portal under Monitor -> Alerts -> New alert rule -> Resource -> Select -> Select a resource -> Filter by resource type -> select 'Application Insights' -> Resource -> select CorrectApplicationInsightsName -> Done.