Adding AI Analytics query to AI dashboard? - azure

I created a couple of queries in Application Insights Analytics to get me the charts I want.
Example:
customEvents
| where timestamp >= ago(31d)
| where name == "Search"
| project name, customDimensions, customMeasurements, customDimensions.["Query"]
| summarize count() by tostring(customDimensions.["Query"])
| render piechart
Now I was wondering if it is possible to add this query / chart to my Application Insights dashboard? I don't want to always have to go to the analytics tool to see this specific chart.
I've been googling but without result.
Thanks,
Thomas

This new capability is in the works and should be released in the upcoming weeks. Would definitely help to operationalize your queries. Stay tuned.
-Dan Hadari
Application Insights Team

Related

Can you wrap or alter the size of the text on an azure monior chart

We use azure monitor for our internal monitoring, and we have quite long descriptions for some charts. I love to wrap or reduce the size of this text, so the chart looks better
customMetrics
|extend Dec_Reasion = tostring(customDimensions["DeclineReason"])
|extend Type = tostring(customDimensions["AcquiringInstitutionId"])
|where name =='TransactionsDeclined'
|summarize sum(valueCount) by tostring(Dec_Reasion), bin(timestamp, 1h)
the bar chart is even worse!
As of now, currently there is no option to modify the size of the text in a KQL result set. You can use alternate workaround to achieve this
Using Dashboard
In your Azure Monitor Query Editor after query result. You can pin the result into dashboard. In Dashboard we have a flexibility to increase the overall result.
View in Dashboard
If it really requires for future purpose reopen a feature request in Developer community.

Dynamic userId in kusto query Application Insights

I'm new with Azure Application Insights service, I want to get data from my app (developed with Xamarin Forms, c#) and I need to make a specific query to be able to get a user stats and display it on my Azure Dashboard. I'm able to make this request for all users but not for one user. I show you my query
customEvents
| where name == "LoggedUserEvent"
| where timestamp > now() - 31d
| extend Properties = todynamic(tostring(customDimensions.Properties))
| extend userId = todouble(todecimal(Properties.UserId))
| where userId == XXX
| summarize Total = count() by bin(timestamp, 1d)
| project Total, timestamp
this query work's well and show me Total and timestamp as you can see
but the issue it's I should specify
| where userId == XXX
Each time I want new data about specific user I have to update this line, is there en easier way to get this info using an input text for example or if you have any suggestions, salespeople will use this platform and need to be simple as possible. Thank you in advance.
To achieve the above requirement you can try with page view method so that we can get specific users who logged in to your application instead of using Custom events.
Example of query:
pageViews
| project user_Id , timestamp
| summarize max(timestamp) by user_Id
For more information please refer the below links:-
SO THREAD : Application Insights - Distinct Users and the last time they visited the site & Trying to create a KQL with users who have not logged in within the last 30 days

A chart with a single number using Kusto Query Language

I have a simple Kusto request, something like the following:
customMetrics
| where timestamp > ago(10m)
| where name == "Custom metric number one"
| summarize sum(value)
Obviously, the result of this query is a single number.
I would like to pin this request to a dashboard, so the tile will look like a card having a title/subtitle and the number retrieving as the result of the Kusto request. Firstly, I tried to use "render" operator, but it can draw either a chart or a simple unformatted table. I tried to use "render card", but ApplicationInsights answered that "We currently don't support 'card' visualization type."
Is there any other possibility to create the desired tile with a single number on it?
Why not just pin the table query result:
customMetrics
| where timestamp > ago(10m)
| where name == "Custom metric number one"
| summarize sum(value)
results in
It is probably the closest to a card you can do at the moment
There is another option as well, you can add a Markdown tile, it can point to a url containing Markdown content so you might be able to create something that periodically updates a certain MD file and show that on the dashboard. You can leverage the Application Insights API to get the value you want and have an azure function generate the markdown.
Another option, if you have access to Power Bi, is to create a Power Bi report that you share with external stakeholders/non developers.When going that direction you can use all the rich visuals Power Bi provides in combination with data from Application Insights, including cards. See the docs
Or use grafana? There’s a manager instance in azure albeit still in preview.

How to create a single data tile in azure application insight dashboard?

How to create a single data tile in azure application insight dashboard ?
by single data i mean the XXX(A number)(which i found querying the application insights).
For say - I queried for unique users in Application Insight logs, and I want to display it as Single Data Tile on the Dashboard. i.e. just the number(XXX) and the heading (Unique Users For XYZ Application)
Workbooks will give you tons of features to create custom tiles showing just the number on the tile. Here's how to do it using Workbooks.
Try the code below, then pin to dashboard:
requests
//add the filter for querying unique users
| extend users=""
| summarize number_of_users = count() by users
| render barchart
The result:

Realtime report in power BI

Is it possible to make real-time monitoring report by using Power BI?
I have an experience only with elasticsearch+kibana and I want to make the same dashboard by using Power BI:
There is a data source - RequestDateTime, Sendor, IsSuccess, RequestType, Request, Response. For example:
2016-10-20 12:00:12 | Test 1 | True | SetUserInfo | xml here... | xml here...
2016-10-20 12:00:18 | Test 2 | False | GetUserInfo | xml here... |
This data can be downloaded from Azure SQL database, by using simple sql-query.
I want to make a simple column chart. X-axis should be a timeline, accoring to the RequestDateTime field. Y-axis should be a count of records, that is correspond to filters.
Report should have a filters by sendor, isSuccess, RequestType and RequestDateTime range (for example - last 6 hours).
The report should be able to be refreshed in a real-time mode, according to the new events in the database.
The pipeline I usually do in my work using app.powerbi for real time visualization is :
Create a dataset: In your workspace, select the "create" option, there you can import or connect to data from Files and Databases. You can choose Azure SQL database and follow instructions.
Create a report: In your dataset list, select the icon to create a report (here you define the filters that you want) and save it.
Create a dashboard: Pin the charts to a dashboard. I have found that only dashboard refresh itself when data is added or deleted in the database, thus, you can see the real time in the dashboard.
You may find this video useful.

Resources