Reputation: 4611
According to https://learn.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?
Upvotes: 0
Views: 808
Reputation: 3484
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.
Upvotes: 1