app insights analytics auto run query and email results

1.8k views Asked by At

I've created some queries in app insights analytics that produce tabular data. I'd like to run these queries once a day and email (or Skype or Slack if easier then email) the results to various people.

Is there a built in way to do this, or do I need to use the API?

2

There are 2 answers

0
Arun Vinoth-Precog Tech - MVP On

As such there's no readymade mechanism to run a query & email results in AI Analytics (kusto).

But as you said, we can execute using query API & send emails using c# apps in task scheduler.

https://dev.applicationinsights.io/quickstart/
https://dev.applicationinsights.io/documentation/Using-the-API/Query

I agree, it's Great to have something similar like Alert rules in Metrics explorer.

0
EranG On

You can create an automated flow to run your queries and send you an email with the results. The Application Insights Connector which works both for Flow and Microsoft Logic Apps was created just for that, and can be defined on any query result from any document type (event, metric or even traces). Step-by-step documentation on how to create your own flow are here.