How to use the Azure Application Insights tile
The Azure Application Insights tile allows you to query Application Insights for data
Dashboard Server executes the requests in the context of the logged in user viewing the dashboard.
The ability to render information as a graph is a feature of the Azure portal rather than the App Insights Query language itself. At this time any queries run using the render
statement will still return tabular or scalar data rather than graphs, depending on the tile.
How to configure an Azure Applications Insights tile
Add a new tile to a dashboard and choose the
App Insights tile.Choose the visualization for your tile.
ScalarA single value such as a number of customers or incidents.
Example:
GridA table of data, for example incidents or tickets.
Tip: You can turn the individual rows into links in the settings. For example, if you're displaying tickets in your grid, you can link the rows to the ticket in your external ticket system.
Did you know? Since Dashboard Server 5.4 users can search the grid, and temporarily change the column size and sorting of the grid (by clicking on the column headers) without having to access the settings. They can also expand a row by clicking on the three dots at the end of each row if cells are too small to show their entire content.
Scope:
The scope is optional, and allows you to select Azure resources to inject into the query.
Scope options on dashboardsTip: If you experience any problems with scoping tiles, you'll find FAQs and help in the article How to scope tiles.
Note: By default, results are shown across all subscriptions (unless the subscription option is chosen to specify only one or more subscriptions).
Filter by tenant By default results are shown across all tenants. In Dashboard Server 4.7 and above a user who has access to multiple tenants will see a filter by tenant option.
If you see the message "You do not have access to all of the tenants currently selected" or "Tenant ID could not be resolved"In a multi-tenant environment a user who does not have access to all tenants will see this message if they attempt to edit a scope containing tenants that they do not have access to. This may be because:
- One Dashboard Server admin has added a tile scoped to tenants that other Dashboard Server admins do not have permissions to.
- The customer/tenant is no longer serviced by this Customer Service Provider (CSP), so the tenant has been permanently removed for all Dashboard Server admins.
Symptoms
A tile scope shows:
"You do not have access to all of the tenants currently selected. Click here to reset which will remove those tenants from the scope."
Tenants the user does not have access to show as:
"Tenant ID could not be resolved"
Procedure
The message warns users that they do not have permissions to all the tenants in the scope.
If the user chooses to reset and therefore edit the scope then the tenants that they do not have access to will be removed. If saved this scope will also have those tenants removed for users who do have access to them.
It is not possible for the user to edit the scope without those tenants being removed from the scope.
Where a tenant has been removed permanently you may wish to reset the scope to remove the unresolvable tenants.
List List allows you to select several individual items to show.
You can add multiple
items . To remove anitem click the x to the right of its name.Tip: Start typing and after two characters you'll see suggestions that match the name appear.
Note: It depends on the tile what happens when you select more than one item. For example, when you select two virtual machines for a Status tile, you'll see the status of those VMs individually. When you select two virtual machines for a Cost Management tile, you'll see the cost for the two VMs added together.
Resource group Select one or more resource groups.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen resource group.
Subscription Select one or more subscriptions from the dropdown box if you wish to restrict results to only one or more subscriptions. When this is not used results are shown across all subscriptions.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen subscription.
Tags Select items with a particular tag. Add the tag name and the tag value you want to use to search for. If you select multiple tags, the search automatically 'ANDs' the tags which means the scope only contains items which are tagged with all the tags listed.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen tag(s).
Type Scope type can be used to show all resources of a particular type, for example all databases across all subscriptions, by typing
databases
and selectingSQL databases
.Show hidden types This works in the same way as the Show hidden types option in the Azure portal.
Hidden types include some ancillary resources which are created/managed by Azure infrastructure. It might be useful to display these resources when cleaning up your resource groups or subscriptions.
Scope options on perspectivesNote: If you never used a perspective, you should read Working with perspectives before scoping tiles on perspectives.
The power of perspectives is that tiles on a perspective can use a dynamic scope. A dynamic scope considers the currently viewed
resource . A dynamic scope consists of two different states:the configuration of the scope in the tile (for example, "consider child objects of type logical disk for the currently viewed object")
the actual resolved scope that depends on which
resource you are currently viewing ("this object has 5 child objects of type logical disk")
After configuring the dynamic scope once in the tile, you'll get different results depending how the scope is resolved on the different
resources you are viewing.On perspectives, you can scope tiles to:
this resource
(only on perspectives for resources)The tile's scope will be the resolved to the resource that is currently viewed. child resources
(only on perspectives for resource groups and subscriptions)When you select this option, the scope of the tile will be resolved to all resources that are in the group or subscription that is currently viewed.
If you want to narrow the scope down to a specific type of resource in the group or subscription, you can filter for one specific type of resource.
other resources Gives you the normal, non-dynamic scope options you are used to when scoping tiles on dashboards. This means the tile will not dynamically adapt it's content to the currently viewed
resource , it will always show data for the staticresource picked here.Since the power of perspectives is that their tiles can show data for different
resources depending on whatresource is currently being viewed, you should only select this option when you are sure that there is no relationship between the desired scope and the currently viewedresource .Timeframe:
Here you determine the timeframe for the search query.
The default timeframe uses the dynamic page timeframe.
Take care when using a long timeframe, as this may pull many thousands of entries and significantly impact browser performance.
If your query doesn't specify a timeframe
Set the timeframe to use page timeframe to make the search query adapt to the dynamic page timeframe or set the timeframe to specific timeframe to choose a fixed timeframe. In this case, the search query will ignore the current page timeframe.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.If you are using the page timeframe,you can add a "clamping" timeframe in the query (such as
where timestamp >= ago(7d)
). When the page timeframe is less than 7 days it will be used, but once the page timeframe exceeds 7 days the query will enforce the max time.If your query specifies a timeframe
If you specify a timeframe in the query (e.g.
where timestamp >= ago(2h)
), events must satisfy both the timeframe you set here and in thewhere
clause in your query.If you want to control the timeframe using only the query, set the tile timeframe to time range > all.
Application:
This is your App Insights application. For more information see What is Application Insights?
It is not possible to query multiple applications on a single tile, because the Azure API in use does not support cross-resource queries.
Query:
The tile uses the query language KQL ("Kusto"). KQL is very rich and offers features such as sorting, projection and calculated values, which you can use to control the display of data in your dashboard.
Check out our GitHub Samples repository for sample KQL queries from the community that can be used in Azure tiles.
For more information about writing KQL queries see this external Microsoft article.
Query tips and examples for GridsExample for a performance information request query for a Grid
Copyrequests
| summarize percentiles(duration, 50, 90, 95) by bin(timestamp, 1h)Tips for Grid queries
Modify your App Insights query to only return the columns you want to display via
project
orproject away
. You can hide columns later in the settings, but filtering them directly in the query will improve performance when loading and displaying the tile.The Azure API in use does not support cross-resource queries.
Configure the settings for your visualization:
Settings for ScalarsScalar
Font size Allows you to set the font size of the value in the tile.
Unit Allows you to add a unit to the value displayed in the Scalar tile. For example, if your value shows a time in milliseconds, you can enter "ms" or if your value shows pageviews, you can enter "pageviews".
Value formatter Allows you to format the value by using the mustache picker. For example, you can round the value up or down or convert it.
Conditional formatting:
You can display the scalar in different colors based on conditions you defined here. For example, you can display the scalar in green when the value is below 100 and in red when it is above 100.
Click on add to configure a condition.
Click on select color.... to open the color picker. Select the color for this condition.
Enter your condition in the field next to the color. You can use the
value
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:Value is greater than something, less than something, etc.
For example:
{{value < 10}}
(The color you picked will be used if the value is less than 10)Value is present in the result
For example:
value.IndexOf('error') != -1
(The color you picked will be used if the string value "error" is present in the results)Value matches one of the regular expressions you defined
For example:
value.match(/healthy|good|up/)
(The color you picked will be used if the string values arehealthy
,good
, orup
)
Display:
Here you decide how the color is used:
Tile background Highlight the tile in the color you defined. Text foreground
Display the text in the color you defined. Link options
Allows you to turn the graph item(s) into links. You can either enter plain text to create a fixed link (URL always stays the same) or use dynamic properties to create a dynamic link.
Dynamic links make use of dynamic properties which are inserted as part of the URL. This creates a template URL that will be resolved to an actual URL based on the items properties.
For example, if you want to link to tickets in your ticket system and the format of the URL for tickets in your system is
https://www.my-system/ticket-123
, where123
is the ticket ID, you can use the dynamic property that contains the ticket ID and enter the dynamic URLhttps://www.my-system/ticket-{{ticketID}}
.For scalars, you can only use the dynamic property
value
in dynamic links, which means the link changes when the value of the scalar changes. Since a scalar is just one item, it would also make sense to use a fixed link, for example the link to the website of which you are displaying the response time.For status icon or bars and the rows of a grid, you usually want to use a dynamic link since you get multiple items or rows that represent different things. You can use any of the dynamic properties the mustache picker offers you.
Examples for URLs with dynamic properties for popular APIsDynamic mustache properties and values you need to change according to your instance are highlighted in bold.
ServiceNow incidents:
https://<your-instance>.service-now.com/nav_to.do?uri=%2Fincident.do%3Fsys_id%3D{{sys_id}}
PagerDuty incidents:
{{incident.html_url}}
Azure DevOps projects:
https://dev.azure.com/<your-instance>/{{name}}
Azure DevOps builds:
https://dev.azure.com/<your-instance>/_build/results?buildId={{id}}
Zendesk tickets:
https://<your-instance>.zendesk.com/agent/tickets/{{id}}
Azure Application Insights
https://portal.azure.com/#@squaredup.net/resource/{{ResourceId}}
Settings for GridsGrid columns
Grid columns opens the grid designer, where you can show or hide columns, change the order of columns, edit column names or add custom columns.
Grid options
Row link Allows you to turn the graph item(s) into links. You can either enter plain text to create a fixed link (URL always stays the same) or use dynamic properties to create a dynamic link.
Dynamic links make use of dynamic properties which are inserted as part of the URL. This creates a template URL that will be resolved to an actual URL based on the items properties.
For example, if you want to link to tickets in your ticket system and the format of the URL for tickets in your system is
https://www.my-system/ticket-123
, where123
is the ticket ID, you can use the dynamic property that contains the ticket ID and enter the dynamic URLhttps://www.my-system/ticket-{{ticketID}}
.For scalars, you can only use the dynamic property
value
in dynamic links, which means the link changes when the value of the scalar changes. Since a scalar is just one item, it would also make sense to use a fixed link, for example the link to the website of which you are displaying the response time.For status icon or bars and the rows of a grid, you usually want to use a dynamic link since you get multiple items or rows that represent different things. You can use any of the dynamic properties the mustache picker offers you.
Examples for URLs with dynamic properties for popular APIsDynamic mustache properties and values you need to change according to your instance are highlighted in bold.
ServiceNow incidents:
https://<your-instance>.service-now.com/nav_to.do?uri=%2Fincident.do%3Fsys_id%3D{{sys_id}}
PagerDuty incidents:
{{incident.html_url}}
Azure DevOps projects:
https://dev.azure.com/<your-instance>/{{name}}
Azure DevOps builds:
https://dev.azure.com/<your-instance>/_build/results?buildId={{id}}
Zendesk tickets:
https://<your-instance>.zendesk.com/agent/tickets/{{id}}
Azure Application Insights
https://portal.azure.com/#@squaredup.net/resource/{{ResourceId}}
Show column headers You can choose between showing or hiding the header for all columns.
Expand rows automatically Activate this checkbox if you want the row height to expand automatically based on the row content, for example if your grid uses increased text size, images, emojis etc.
Limit number of results displayed You can set a limit of the initial number of results displayed in the grid. If you have set a limit and there are more results to display, users will see a "show all" button below the grid.
Font size Use the slider to adjust the font size.
Tip for column sizing: You can change the column width directly in the grid by clicking on the divider lines between columns and dragging them to the width you want. You need to show column headers (by activating the show column headers check box) to be able to change the column width.
Resizing columns while in edit mode affects how the grid looks by default when users open the dashboard. Users can temporarily change the column sizes by dragging them, but those changes only last until they leave the page.Click done to save the tile.
The tile now shows data according to your settings.