Azure Log Analytics tile
About Azure Log Analytics tiles
The Azure Log Analytics tile allows you to query Log Analytics data from Azure Monitor(both stand-alone and in the context of resources within Azure) and display that information as part of your SquaredUp DS 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
- Add a new tile to a dashboard and click on Integrations > Logs.
- Choose the visualization for your Azure Log Analytics tile:
A Scalar displays one value. A Scalar is useful to show a specific number like "total cost of my services" or "free disk space on this server".
When a Data Stream returns multiple values (meaning a table with multiple rows), you will still be able to pick the Scalar visualization, but the Scalar will only show the value of the first row.Example:
A 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 SquaredUp DS 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.
Shows time-series 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:
Visualizes time-series data as vertical columns.
Example:
Visualizes both a number and the resulting bar width based on the number value.
Example:
Shows the results in a donut shape.
Example:
Shows 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:
Shows the state of items as blocks with different colors.
Example:
- Scope:
The scope is optional.
If you use a scope ensure that it contains resources monitored by Azure Log Analytics.Tip: 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 tenantBy default results are shown across all tenants. In SquaredUp DS 4.7 and above a user who has access to multiple tenants will see a filter by tenant option.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 SquaredUp DS admin has added a tile scoped to tenants that other SquaredUp DS 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 SquaredUp DS 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.
ListList allows you to select several individual items to show.You can add multiple items. To remove an item 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 groupSelect 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.SubscriptionSelect 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.TagsSelect 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).TypeScope type can be used to show all resources of a particular type, for example all databases across all subscriptions, by typingdatabases
and selectingSQL databases
.Show hidden typesThis 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.Note: 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 resourcesGives 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 static resource picked here.
Since the power of perspectives is that their tiles can show data for different resources depending on what resource 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 viewed resource.
When you select a resource group in the resource group section, the status for resources within that resource group will be shown.
- 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.
The page timeframe is the timeframe setting a dashboard or perspective is currently using. These timeframes are all relative to the current time, for example 7 days ago until now. When a user changes the page timeframe, all tiles that have use page timeframe set will adapt to the new timeframe. (Tiles that do not have use page timeframe set (i.e. are set to specific timeframe or custom timeframe) are not 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.
- Workspace:
Pick the workspace you want to query from the drop-down list. For more information see Create a Log Analytics workspace in the Azure portal.
It is not possible to query multiple workspaces on a single tile, because the Azure API in use does not support cross-resource queries. - 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.
view in portal button:
Opens the specified workspace in the Azure portal in a new tab. From here you can test any query to be sure it returns the results expected, then save the query to the workspace, so it is ready to be accessed from SquaredUp DS using the saved searches button.
saved searches button:
Will list all searches saved in the selected workspace. This is a quick and easy way to pull a query from the logs workspace into SquaredUp DS, where it can be edited if required.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.
Read about the timeframe panel below to see how a timeframe in the query interacts with the timeframe panel in the tile.
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 can include Mustache syntax to create a dynamic query that will change depending on the object being viewed. After typing
{{
the mustache helper will appear, see below. This is particularly useful on perspectives where you can insert the object name as a variable using mustache syntax.When specifying a mustache clicking the {{}} button or typing {{ brings up a helpful picker which shows all the properties of your selected object, along with sample values. It also includes a suggested mustache for creating a dynamic list of names which is useful if the tile is scoped to more than one object (such as a list, group, Enterprise Application, or class).
Once the mustache helper is displayed, the list of properties will automatically filter based on what you type, allowing you to quickly find a property using a partial name or likely term. Clicking an item in the list will automatically insert that property into your query and complete the mustache.
For example, if you have specified a computer in the scope section you can insert the computer name into the query using
{{scope[0].displayName}}
or on a perspective use{{displayName}}
to create a dynamic query scoped to the object being viewed.Property names are case-sensitive and should be written as they appear in the mustache helper (e.g.
displayName
notDisplayName
).Your query must return a single figure.
The 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
greenWarning
yellowCritical
redUnknown
grayYour 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:
timestampHere you define the time series to be used for the visualization.
valueHere 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.).
groupingHere 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.
Your 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:
valueHere 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.).
groupingHere 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.
Your 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:
valueHere 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.).
groupingHere 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.
- Configure the settings for your visualization:
Scalar
Font sizeAllows you to set the font size of the value in the tile.
AlignmentSelect the scalar text alignment. Choose from left, center or right.UnitAllows 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 formatterAllows you to format the value by using the mustache picker. For example, you can round the value up or down or convert it.
Color
Conditional formatting:
You can display the data in different colors based on values you define here. For example, you can display the data 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 pick will be used if the value is less than 10) - Value is present in the result (scalar tiles only)
For example:value.IndexOf('error') != -1
(The color you pick will be used if the string value "error" is present in the results) - Value matches one of the regular expressions you defined (scalar tiles only)
For example:value.match(/healthy|good|up/)
(The color you picked will be used if the string values arehealthy
,good
, orup
)
- Value is greater than something, less than something, etc.
Display:
Here you decide how the color is used:
Tile backgroundHighlight the tile in the color you defined.Text foregroundDisplay 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.
Dynamic 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}}
Grid 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 linkAllows 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.
Dynamic 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 headersYou can choose between showing or hiding the header for all columns.
Expand rows automaticallyActivate 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 displayedYou 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 sizeUse 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.Threshold
You can choose to apply a threshold line at a specified value, and whether you wish to fill above or below this value, or just show the line. For example, for free disk space you might want to fill below the line to highlight when space goes below a particular threshold. For processor information you might want to fill above the line to highlight when processor percentage goes above that threshold. The threshold is also shown on the drilldown view.
Max, min, avg
When drilled-down to view a graph, you can select the min, max and avgoptions for each object (displayed to the right of the graph), which displays a line cutting horizontally across the graph a each of the selected value points.
Data 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.
percentageShows 0 to 100fit to dataShows the data minimum to data maximumfit to data (from zero)Shows from 0 to the data maximumcustomAllows you to specify the min and maxcustom fitAllows 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.
Show hover details:
Shows the value for all lines at any point you hover. There may not be a value exactly where you hover so the value is interpolated from the values either side.
Show points:
Shows where the data points are on the line. Useful to identify missing points, or detail for changing data.
Show trend
Enable the Show Trend Linestoggle to display a trend line for the line graph data. Disable the toggle to hide the trend line.
Custom colors:
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- 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
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
Label
Allows you to change the label of the results.
Show legend:
Allows you to show or hide the legend of the graph.
Label:
autoChoose this option if you want to use the default label that has been created automatically.
customHere 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
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}}
Threshold
You can choose to apply a threshold line at a specified value, and whether you wish to fill above or below this value, or just show the line. For example, for free disk space you might want to fill below the line to highlight when space goes below a particular threshold. For processor information you might want to fill above the line to highlight when processor percentage goes above that threshold. The threshold is also shown on the drilldown view.
Data 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.
percentageShows 0 to 100fit to dataShows the data minimum to data maximumfit to data (from zero)Shows from 0 to the data maximumcustomAllows you to specify the min and maxcustom fitAllows 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.
Show hover details:
Shows the value for all lines at any point you hover. There may not be a value exactly where you hover so the value is interpolated from the values either side.
Solid bars:
Show the bars as solid color or translucent.
Custom colors:
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- 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
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
Label
Allows you to change the label of the results.
Show legend:
Allows you to show or hide the legend of the graph.
Label:
autoChoose this option if you want to use the default label that has been created automatically.
customHere 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
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}}
Data 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.
percentageShows 0 to 100fit to dataShows the data minimum to data maximumfit to data (from zero)Shows from 0 to the data maximumcustomAllows you to specify the min and maxcustom fitAllows 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.Value
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.
Label
Allows you to change the label of the results.
autoChoose this option if you want to use the default label that has been created automatically.
customHere 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
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
multiple colorsHere you can enable or disable graph color matching.If you turn color matching on, one item (a specific resource, object, site, anything you are displaying in your graphs) is shown in the same color in different graphs on one dashboard or one perspective. You can use either color matching or custom colors (colors based on values), they cannot both be used at the same time.
custom colorsSetting colors based on values
You can display the data in different colors based on values you define here. For example, you can display the data 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 pick will be used if the value is less than 10) - Value is present in the result (scalar tiles only)
For example:value.IndexOf('error') != -1
(The color you pick will be used if the string value "error" is present in the results) - Value matches one of the regular expressions you defined (scalar tiles only)
For example:value.match(/healthy|good|up/)
(The color you picked will be used if the string values arehealthy
,good
, orup
)
- Value is greater than something, less than something, etc.
You are able to combine value matching with label matching.
Setting colors based on labels
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- 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
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
You are able to combine label matching with value matching.
Sort
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).
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.
Display
Size mode:
DefaultDisplays the donut scaled to the height of the tile.FillEnlarges 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.
Table or Inline:
Show the legend as a separate table or as labels pointing to the segments. When using Inline you can also hide the segment values, and use the slider to change the size of the labels.
Show zero values in legend:
Will show legend items for values of zero which are otherwise missing from the donut.
Fixed height scrollable legend:
Sets the legend to a fixed height where you can scroll through the items. This means that the tile doesn't become too large if there are many items.
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.
General10 different colors without specific meaningPriorities5 different colors representing 5 different priority statesHealth13 different colors representing 3 different health states
(red=unhealthy, green=healthy, gray=unknown)Health24 different colors representing 4 different health states
(red=critical, orange=unhealthy, green=healthy, gray=unknown)Pastel10 different pastel colors without specific meaningBlue4 different shades of blue from dark to lightOrange4 different shades of orange from dark to lightGreen4 different shades of green from dark to lightPink4 different shades of pink from dark to lightCustomSetting colors based on values
You can display the data in different colors based on values you define here. For example, you can display the data 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 pick will be used if the value is less than 10) - Value is present in the result (scalar tiles only)
For example:value.IndexOf('error') != -1
(The color you pick will be used if the string value "error" is present in the results) - Value matches one of the regular expressions you defined (scalar tiles only)
For example:value.match(/healthy|good|up/)
(The color you picked will be used if the string values arehealthy
,good
, orup
)
- Value is greater than something, less than something, etc.
You are able to combine value matching with label matching.
Setting colors based on labels
You can display the data in different colors based on labels. For example, you can display data in green for a specific user.
- 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
label
property and manipulate it with JavaScript String and Regex APIs. When you click on the mustache picker, you'll get some examples:- Condition is true if the label contains something
For example:{{label.indexOf('SQL') != -1}}
(The color you pick will be used if the label contains 'SQL') - Condition is true if the label contains multiple things
For example:{{label.match(/C:|D:|E:/) != null}}
(The color you pick will be used if the label contains 'C:', 'D:' or 'E:') - Condition is true if the label contains multiple things with multiple variations
For example:{{label.match(/^[Ss]erver[0-9]+$/) != null}}
(The color you pick will be used if the label is 'Server' or 'server' with a number after it)
- Condition is true if the label contains something
You are able to combine label matching with value matching.
Link 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.
Dynamic 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.
nameChoose this option if you want to use the default label that has been created automatically.
customHere 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
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.
customHere 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
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}}
noneBy 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.
defaultBy default, the sorting of resources depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.sort bySort by label or tenant, ascending or descendinggroup byGroup by label or tenant, ascending or descendingLimit:
Allows you to define a maximum number of resources that will be shown. When 'group by' is used the limit applies to each group individually, for example to show 10 resources in each health state.
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 listColumn listIcons onlyLink 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.
Dynamic 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.
nameChoose this option if you want to use the default label that has been created automatically.
customHere 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
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.
customHere 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
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}}
noneBy 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.
defaultBy default, the sorting of resources depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.sort bySort by label or tenant, ascending or descendinggroup byGroup by label or tenant, ascending or descendingLimit:
Allows you to define a maximum number of resources that will be shown. When 'group by' is used the limit applies to each group individually, for example to show 10 resources in each health state.
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 SquaredUp DS 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 Logs > Logs(Grid)
- The scope is optional, and allows you to select Azure resources to inject into the query. For this walkthrough you can leave the scope empty.
For more information see How to scope tiles. - Leave the timeframe as use page timeframe.
- In the workspace section select a Log Analytics workspace from the drop down list.
- On the Query panel you can use the saved searches button to use a query from your workspace, or you can use the following Log Analytics Query:
UpdateSummary | 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 desc
- The grid columns section allows you to hide and edit columns. For this walkthrough hide some columns you don't need to see by clicking the hide link next to them.
- 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. - Leave the grid options section as it is for this walkthrough.
- 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 SquaredUp DS.
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.
Read about the timeframe panel below to see how a timeframe in the query interacts with the timeframe panel in the tile.
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
"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).