How to use the Azure Log Analytics tile
About Azure Log Analytics tiles
The Azure Log Analytics tile allows you to query Log Analytics data from Azure Monitorand display that information as part of your Dashboard Server dashboard.
The Azure Log Analytics tile queries Log Analytics using the query language (KQL).
The ability to render information as a graph is a feature of the Azure portal rather than the Log Analytics Query language itself. Graphs will only be shown if you have selected a suitable graph tile such as the Log Analytics Line Graph or Log Analytics Donut.
Note: If you want to show VM Insights data you need to enable VM Insights first, see How to show VM Insights data with the Azure Log Analytics tile.
How to configure an Azure Log Analytics tile
You need to have an Azure Log Analytics provider before you can configure an Azure Log Analytics tile. If you haven't created a provider yet, see How to add an Azure Log Analytics provider.
Add a new tile to a dashboard and choose the
Azure tile.Choose the visualization for your Azure Log Analytics 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.
Line GraphShows data over time, in a graph with an x-axis (time) and a y-axis. You can show several objects, such as servers, in one graph.
Example:
Bar GraphVisualizes both a number and the resulting bar width based on the number value.
Example:
DonutShows the results in a donut shape.
Example:
Status IconsShows the state of items as icons with different colors. You can display just the icons or together with a description. You can also use a background image and drag the icons into position on the image.
Example:
Status BlocksShows the state of items as blocks with different colors.
Example:
Provider:
A provider defines the Log Analytics workspace that you wish to query. Select a provider from the drop-down list.
If you haven't created a provider yet, see How to add an Azure Log Analytics provider.
Query:
Test your query in the Log Analytics workspace in the Azure portal to be sure it returns the results expected. You can find many sample queries in this area of the portal.
Copy and paste the tested query into the Azure Log Analytics tile query box.
How to write an Azure Log Analytics queryThe 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.
Queries for ScalarsYour query must return a single figure.
Queries for Status Icons or BlocksThe return data must include a
state
column which must contain the following values:healthy
,critical
, and/orwarning
(the values are not case-sensitive). Any other values will result in stateunknown
.The state values define the color of the status icons or blocks:
Healthy
green Warning
yellow Critical
red Unknown
gray Queries and Column Overrides for Line GraphsYour query must return as a minimum a DateTime field and a Numeric value field.
Column Overrides
Here you define how the returned data is displayed. Use the dropdowns to specify which data/column you want to use:
timestamp
Here you define the time series for the x-axis of the graph.
value
Here you define which value the graph will show. For example, if you want to see the response time of different servers, your metric value would be response time. If you want to see the number of tickets, your metric value would be number (of tickets).
show all: If there are multiple values, you can display these by ticking this box. Each value will get its own series (a line in a line graph, a bar in a bar graph etc.).
grouping
Here you can define a group to take a closer look at the graph's value(s). Each item in the group will create its own series (a line in a line graph, a bar in a bar graph etc.). For example, if you group the value response time by servers on a line graph, you'll see one line per server, each line showing you the response time for this one server over time.
Queries and Column Overrides for Bar GraphsYour query must return a numeric field for the value and a string for grouping.
You can choose to sort or not sort the results using the KQL query, for example:
| top 5 by max_counterValue asc
Column Overrides
Here you define how the returned data is displayed. Use the dropdowns to specify which data/column you want to use:
value
Here you define which value the graph will show. For example, if you want to see the response time of different servers, your metric value would be response time. If you want to see the number of tickets, your metric value would be number (of tickets).
Only for Bar Graphs:
show all: If there are multiple values, you can display these by ticking this box. Each value will get its own series (a line in a line graph, a bar in a bar graph etc.).
grouping
Here you can define a group to take a closer look at the graph's value(s). Each item in the group will create its own series (a line in a line graph, a bar in a bar graph etc.). For example, if you group the value response time by servers on a line graph, you'll see one line per server, each line showing you the response time for this one server over time.
Queries and Column Overrides for DonutsYour query must return a numeric field for the value and a string for grouping.
Queries for donuts should return a maximum of 10 categories. This can be achieved by using the top or limit operators in your query.
Column Overrides
Here you define how the returned data is displayed. Use the dropdowns to specify which data/column you want to use:
value
Here you define which value the graph will show. For example, if you want to see the response time of different servers, your metric value would be response time. If you want to see the number of tickets, your metric value would be number (of tickets).
Only for Bar Graphs:
show all: If there are multiple values, you can display these by ticking this box. Each value will get its own series (a line in a line graph, a bar in a bar graph etc.).
grouping
Here you can define a group to take a closer look at the graph's value(s). Each item in the group will create its own series (a line in a line graph, a bar in a bar graph etc.). For example, if you group the value response time by servers on a line graph, you'll see one line per server, each line showing you the response time for this one server over time.
How to send a query to multiple workspacesThe Azure API allows you to send a query to multiple workspaces (for Log Analytics) or applications (for App Insights) simultaneously using implicit and explicit cross-resource unions. The Log Analytics and the App Insights tile support both mechanisms, with implicit being easier but explicit offering more control over how data is returned.
Regardless of which mechanism you use, you may only query across 10 apps (for App Insights) or 10 workspaces (for Log Analytics) with a single cross-resource query (and therefore a single tile), and the provider's configured app is always used.
Using implicit Unions
When you use implicit unions, you provide a query to the tile and specify up to 9 other additional workspace/app identifiers. The query is automatically sent to the provider's configured workspace and any others you specify, and the output joined together in a single result for further processing. To configure an implicit cross-resource query:
For Azure Log Analytics tiles: In the query panel click add under additional workspaces.
For Azure App Insights tiles: In the query panel click add under additional applications.
Enter an identifier for your workspace/app (using any of the formats given below) and press enter or deselect the text box.
Either repeat the process by clicking add again and adding additional workspaces/apps, or click next and continue to configure the tile.
Using explicit Unions
In contrast to implicit unions, explicit ones are specified directly within your query using the
Union
statement, and allow you to pull in a specific subset of the data in the other workspaces/apps. For further information check out this Azure blog post on Querying across resources.For Azure Log Analytics tiles:
The example below shows results from the provider's workspace, along with only security updates from another namedcontosoretail
:Copyunion Update, (workspace("contosoretail").Update | where Classification == "Security Updates" )
| where TimeGenerated >= ago(1h)
| where UpdateState == "Needed"
| summarize dcount(Computer) by ClassificationFor Azure App Insights tiles:
The example below shows results from the provider's app, along with only GET request exceptions from another namedcontosoretail
:Copyunion exceptions, (app("contosoretail").exceptions | where operation_Name contains "GET" )
| summarize count() by problemIdIdentifiers for workspaces
The following methods are supported to identify your workspace/app:
Resource name The human readable name of the resource.
Note: If used this must be unique to all Azure subscriptions the provider has access to or the query will fail as ambiguous.
Qualified name The "full name" of the workspace, in the following format:
For Azure Log Analytics:
<subscriptionName>/<resourceGroup>/<workspaceName>
For Azure App Insights:
<subscriptionName>/<resourceGroup>/<applicationName>
Note: The qualified name may still be ambiguous as subscription names are not unique, but it is extremely unlikely.
GUID
The GUID (e.g.
b438b4f6-912a-46d5-9cb1-b44069212ab4
), which is completely unique and unambiguous.For Azure Log Analytics: The GUID is the Workspace ID
For Azure App Insights: The GUID is the Application ID
Azure Resource ID A string in the following format:
For Azure Log Analytics:
/subscriptions/<subscriptionId>/resourcegroups/<resourceGroup>/providers/microsoft.OperationalInsights/workspaces/<componentName>
For Azure App Insights:
/subscriptions/<subscriptionId>/resourcegroups/<resourceGroup>/providers/microsoft.operationalinsights/applications/<applicationName>
Note: While the string is unambiguous, it is also extremely long and difficult to work with.
Timeframe:
Here you determine the timeframe for the search query.
The default timeframe is 24 hours, which means the tile will not return any entries older than 24 hours.
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 time range to the fixed time range you want to use.
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.
Note:
This tile always ignores the dynamic page timeframe set by users.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard 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.
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.Settings for Line GraphsData range
The Data Range option allows you to choose the range of data the graph will display. For line graphs, this means the data on the y-axis.
percentage Shows 0 to 100 fit to data Shows the data minimum to data maximum fit to data (from zero) Shows from 0 to the data maximum custom Allows you to specify the min and max custom fit Allows you to specify the min and max limits, so that data outside your settings will not be shown. If all the data falls within your specified ranges then the y-axis range will fit to the data rather than your caps.
Display
Height: Allows you to set the height of the tile with a slider.
Label
Allows you to change the label of the results.
Show legend:
Allows you to show or hide the legend of the graph.
Label:
auto Choose this option if you want to use the default label that has been created automatically.
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
Settings for Bar GraphsData Range
The Data Range option allows you to choose the range of data the graph will display. For line graphs, this means the data on the y-axis.
percentage Shows 0 to 100 fit to data Shows the data minimum to data maximum fit to data (from zero) Shows from 0 to the data maximum custom Allows you to specify the min and max custom fit Allows you to specify the min and max limits, so that data outside your settings will not be shown. If all the data falls within your specified ranges then the y-axis range will fit to the data rather than your caps.
Label
Allows you to change the label of the results.
auto Choose this option if you want to use the default label that has been created automatically.
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
Color
Here you can enable or disable graph color matching.
Settings for DonutsSort
Sort allows you to change the order of the results displayed. You can sort by value (ascending or descending) or label (alphabetically ascending or descending).
Display
Size mode:
Default Displays the donut scaled to the height of the tile. Fill Enlarges the donut to use the whole width of the tile. If you chose the fill option and show the legend, you can define the size of the legend with a slider. Show legend:
Allows you to show or hide the legend of the graph.
Display mode:
Allows you to switch between displaying absolute values or percentages.
Color palette:
Here you can choose between different color palettes.
Note: If there are more items than colors, the colors repeat from the beginning.
Tip for displaying priorities or health states: If you want to display priorities or health states from a data source that doesn't enrich the data with information about priority or health (like the SQL tile or external APIs), use the custom color option and map the results to the correct color. This way, you can make sure that healthy or low priority results are displayed in green, unhealthy or high priority results are displayed in red, etc. If you use the color palettes Priorities, Health1, or Health2 the colors get assigned depending on how the results are sorted, which doesn't guarantee that the colors make sense for the priority or state they represent.
General 10 different colors without specific meaning Priorities 5 different colors representing 5 different priority states Health1 3 different colors representing 3 different health states
(red=unhealthy, green=healthy, gray=unknown)Health2 4 different colors representing 4 different health states
(red=critical, orange=unhealthy, green=healthy, gray=unknown)Pastel 10 different pastel colors without specific meaning Blue 4 different shades of blue from dark to light Orange 4 different shades of orange from dark to light Green 4 different shades of green from dark to light Pink 4 different shades of pink from dark to light Custom Here you can choose colors and map them to a value.
Click on Select color... to select a color and enter the name of the value that you want to display in that color. Make sure you spell the value's name correctly (case-sensitive), otherwise the color won't be assigned to it.
Note if your color mapping doesn't work (color stays gray)If you entered the value's name correctly (case-sensitive) and your mapping still doesn't work, check if the mapping value contains leading or trailing spaces. Try to enter the value with and without those spaces. Alternatively, you can remove spaces from the mustache expression and enter the values without spaces.
Example:
Mustache expression with leading and trailing spaces in the values:
{{#if Status == "1" }} Healthy {{elseif Status == "2" }} Down {{elseif Status == "3" }} Warning {{/if}}
Mustache expression without spaces in the values:
{{#if Status == "1" }}Healthy{{elseif Status == "2" }}Down{{elseif Status == "3" }}Warning{{/if}}
Settings for Status IconsLink options
item 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}}
Label
Allows you to change the label of the results.
name Choose this option if you want to use the default label that has been created automatically.
custom Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
Sublabel
Allows you to add a sublabel of the results.
custom Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
none By default, no sublabels are shown. Sort
Sort allows you to change the order of the results displayed. You can also group them by their characteristics.
default By default, the sorting of the blocks or icons depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.
sort by
Sort by label or health state, ascending or descending
group by Group by label or health state, ascending or descending
Image
Here you can choose one of the provided images or upload your own.
Tip: If you want a different selection of maps, you can download more at https://freevectormaps.com/Supported image formats: png, jpg, jpeg, gif, tif, tiff. svg, bmp
Tip: SVG images resize best since they are vector images.File size limit: 10MB
Image size: Images fill the size of the tile, which means you can resize the image by adjusting the tile's size. The size of the tile also depends on the screen the dashboard is being viewed on.
Icons
Here you can customize the icons on the image:
You can change the size of the icons with the slider
You can change the shape of the icons (square or circle)
You can drag the icons on the image into position
Display styles for Status icons
This setting is not done in a panel, you can change the display style even after you finished configuring the tile.
You can use toggle zoom button at the top right of the tile to change between the different ways Status icons can be displayed.
One long list Column list Icons only Settings for Status BlocksLink options
item 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}}
Label
Allows you to change the label of the results.
name Choose this option if you want to use the default label that has been created automatically.
custom Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
Sublabel
Allows you to add a sublabel of the results.
custom Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
For more information see How to use Custom Labels
Important note if you are using external API properties with hyphens for custom labels (Web API tile, Elasticsearch tile, Splunk tile)Property names that contain hyphens (for example
properties.name-with-hyphens
) can't be processed due to a JavaScript limitation. If you want to use a property that contains a hyphen, you have two options:If you have access to the data source and can change the name of the property, change the name of the property to a name without hyphens.
For example, if your Elasticsearch query uses a property (an aggregation, a grouping or any other property you want to use) with a name that contains a hyphen, you can either access your Elasticsearch instance and change the name there or you can overwrite the name in the query dsl field.
If you can't change the name of the property, you need to enter the property name in the following format:
Original property name:
{{properties.name-with-hyphens.value}}
New format:
{{properties['name-with-hyphens'].value}}
none By default, no sublabels are shown. Sort
Sort allows you to change the order of the results displayed. You can also group them by their characteristics.
default By default, the sorting of the blocks or icons depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.
sort by
Sort by label or health state, ascending or descending
group by Group by label or health state, ascending or descending
Blocks
Here you can set the number of columns for the blocks, their height and the font size within the blocks.
Click done to save the tile.
The tile now shows data according to your settings.
Walkthrough
For this walkthrough, you are going to query Software Update status summary information. The provided sample below assumes you have the Update Management solution enabled for your workspace.
In Dashboard Server browse to the dashboard you wish to add the Azure Log Analytics tile to.
Click on the orange + button to add a new tile, then click on
Azure > LogAnalytics (Grid)In the provider select the provider you created earlier.
On the Query panel, enter the following Log Analytics Query:
CopyUpdateSummary
| summarize max(TimeGenerated) by Computer
| project Computer, TimeGenerated = max_TimeGenerated
| join (
UpdateSummary
| where TotalUpdatesMissing > 0 or RestartPending == true
)
on Computer, TimeGenerated
| project-away Computer1, TimeGenerated1
| order by TimeGenerated descLeave the timeframe on 24 hours. For other queries, be careful with extending the timeframe beyond 7 days, as this may pull many thousands of log entries and significantly impact browser performance.
Configure the desired columns on the grid columns panel. As a best practise, once you know which columns you want to display, modify the Log Analytics query to only return those columns (via
project
orproject away
), as it will improve performance when loading and displaying the tile.You can customize the appearance of columns by clicking the edit link next to it's name in the grid columns panel and then specifying a custom template. For example, locate the TimeGenerated column and set the template to
{{timeago(value)}}
to show a friendly time in the formLast x minutes
rather than the specific time. For more information see How to use the Grid Designer.Click done.
How to show VM Insights data with the Azure Log Analytics tile
VM Insights allows you to collect additional metrics called guest level metrics from your virtual machines (VMs).
You need to enable VM Insights in your Azure portal for each VM you want to monitor before you can show VM Insights data with the Azure Log Analytics tile.
You can find all information about enabling VM Insights in the Azure documentation.
Where to find KQL queries for showing VM Insights data
You can find useful queries by viewing VM Insights in your Azure portal. You'll see the underlying queries of Performance graphs when you edit them in Azure and can copy them from there. The Dependency Map shown in the Azure portal cannot currently be shown in Dashboard Server.
InsightsMetrics
| where Namespace == "Processor"
| where Name == "UtilizationPercentage"
| summarize avg(Val) by Computer, bin(TimeGenerated, 5m)
For perspectives, you need to pull in the VM that is the focus of the perspective with {{scope[0].name}}
:
InsightsMetrics
| where Computer startswith "{{scope[0].name}}"
| where Namespace == "Memory"
| where Name == "AvailableMB"
| summarize avg(Val) by Computer, bin(TimeGenerated, 5m)
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.
Troubleshooting
Attempts to authorize the provider fail
Ensure that you have added the Reply URL to the Azure AD application, and that you have given Azure enough time to replicate the configuration (often takes several minutes).
"The API returned a 400 response" with message "Failed to resolve entity 'xxxxx'
Typically this indicates that a solution is missing from the queried workspace, resulting in it not containing the requested table (such as Update
or UpdateSummary
missing from workspaces without the Software Management solution enabled).