Forum Discussion
Querying ApplicationInsights
Hello,
How would I write the query if I wanted to use it for azure alerts, to query though dependencies? I'm currently trying option one listed above, but it is returning an error.
Looks like the data is not been captured in the LA from the VM, please check the following:
1. Check if the data is been captured in LA, try with the basic queries to see the data.
2.Agent is properly installed ? if not try to reinstall it in the VM.
3. Check the Internet connectivity in the VM to communicate also port 443 should be opened as by default the internet access is restricted.
Hope this should give help you.
- DeletedJul 18, 2018
The query is working fine in log analytics, and the data is definitely there, but it is still throwing in error, that states: Query syntax error.
app("Sitecore Production").dependencies
|where
target !contains "brightcove"
and target !contains "sitecore1.maxmind.com"
and target !contains "lkqd"
|summarize
Failure_rate= ((sum(iif(success=="True", 0, 1 ) )+0.00000)/ count()) * 100,
failures=sum(iif(success=="True", 0, 1 ) ),
total=count()
by target, bin(timestamp,1h)
|where Failure_rate > 50
This is the query I am trying to run.
Looking at the first comment, It looks like we were relying on method #2, but seems to be no longer viable.- Evgeny TernovskyJul 20, 2018
Microsoft
Daniel, you're absolutely correct in the query being fine. 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. I've let them know of this discussion, and they'll reply if there's any additional information available.
In this specific case however, the good news is that since you're targeting a single app, Application Insights also supports log-based alerts! Instead of creating this alert targeted at your Log Analytics resource, in the Azure portal open the "Sitecore Production" Application Insights resource, select "Alerts" from the left-hand navigation menu on the AI blade, and under target, select "custom log search". Your query would then look identical, minus using "dependencies" instead of "app(...).dependencies" for your first line.
- Roman_TurovskyyDec 26, 2018Copper Contributor
Hi Evgeny,
Are there any news regarding cross-Application Insights-Log Analytics alerts support? As I can see it does not work yet. Still no ETA for this?