How to use the Cost Management tile
About Cost Management tiles
The Cost Management tile shows the cost of Azure resources, resource groups or subscriptions.
Analysing your Azure costs should help you identify big costs early, spot trends, and tie costs to applications.
The Cost tile is able to display cost information provided the resource group(s)/subscription(s) have been delegated under a role which has the necessary actions (e.g. the Cost Management Reader role).
How to configure a Cost Management tile
Add a new tile to a dashboard and choose the Cost Management tile.
Select the visualization for your Cost Management tile and click next.
ScalarThe Cost Management Scalar tile can be scoped to show the total cost of resources, resource groups or subscriptions. You can list resources to be summed, or select all of a particular type, resource group or tag, as described below.
Line GraphThe Cost Management Line Graph tile shows the cost over time, either as an aggregated single line or individual lines.
TreemapThe size of the rectangle is the cost representation, and the color is the metric representation. The larger the rectangle the higher the cost, and the darker the color the higher the metric value.
By default the metric value is the average for the timeframe selected.
Clicking on an item in the treemap will take you to the drilldown page for that item.
Sun BurstThe value in the center always shows the total for the hovered item.
Clicking on a subscription, resource group or resource will take you to the drilldown page. Hovering over a segment shows the item's name as a tooltip, and the legend labels show the top 5 most expensive items.
Utilization TreemapThe size of the rectangle is the cost representation, and the color is the metric representation. The larger the rectangle the higher the cost, and the darker the color the higher the metric value.
By default the metric value is the average for the timeframe selected.
Clicking on an item in the treemap will take you to the drilldown page for that item.
The Utilization Treemap combines cost with metric. The tile must be scoped so that all the objects are of the same type, because metrics are being used (as with Performance tiles). For example, scope to a resource group or subscription and then use the filter by type to only show virtual machines. For more information see the below Walkthrough: Using the Utilization Treemap to show a heated treemap of cost and percentage CPU.
Scope:
The scope panel allows you to define which resources are used to calculate the total cost shown.
It depends on the scope how results are displayed:
If you want to see the sum of the cost of individual resources, use the list option and select several individual resources.
Known issue: Cost accrued for deleted resources is not included.If you want to see the total cost of all resources with a particular type (for example, all virtual machines), use the type option.
Note for Utilization Treemaps:
When you are using the Utilization Treemap visualization all items in the scope must be of the same type, because metrics are being used.
Note for Scalars:
If you select a resource group in the resource group scope option, the scalar will show the cost of that resource group.
Note:
Users will only see in Dashboard Server what they are allowed to see in the Azure portal, which is controlled by role-based access control (RBAC) for Azure resources. If the user does not have access to any of the resources that the Cost tile is scoped to, they will see a zero cost, or when scoped to a subscription:
The subscription was not found in the list of available subscriptions
. If they have access to some of the resources they will not see the full cost, but instead see the cost of the subset of resources that they have permission to see.Scope options on dashboardsTip: If you experience any problems with scoping tiles, you'll find FAQs and help in the article How to scope tiles.
Note: By default, results are shown across all subscriptions (unless the subscription option is chosen to specify only one or more subscriptions).
Filter by tenant By default results are shown across all tenants. In Dashboard Server 4.7 and above a user who has access to multiple tenants will see a filter by tenant option.
If you see the message "You do not have access to all of the tenants currently selected" or "Tenant ID could not be resolved"In a multi-tenant environment a user who does not have access to all tenants will see this message if they attempt to edit a scope containing tenants that they do not have access to. This may be because:
- One Dashboard Server admin has added a tile scoped to tenants that other Dashboard Server admins do not have permissions to.
- The customer/tenant is no longer serviced by this Customer Service Provider (CSP), so the tenant has been permanently removed for all Dashboard Server admins.
Symptoms
A tile scope shows:
"You do not have access to all of the tenants currently selected. Click here to reset which will remove those tenants from the scope."
Tenants the user does not have access to show as:
"Tenant ID could not be resolved"
Procedure
The message warns users that they do not have permissions to all the tenants in the scope.
If the user chooses to reset and therefore edit the scope then the tenants that they do not have access to will be removed. If saved this scope will also have those tenants removed for users who do have access to them.
It is not possible for the user to edit the scope without those tenants being removed from the scope.
Where a tenant has been removed permanently you may wish to reset the scope to remove the unresolvable tenants.
List List allows you to select several individual items to show.
You can add multiple
items . To remove anitem click the x to the right of its name.Tip: Start typing and after two characters you'll see suggestions that match the name appear.
Note: It depends on the tile what happens when you select more than one item. For example, when you select two virtual machines for a Status tile, you'll see the status of those VMs individually. When you select two virtual machines for a Cost Management tile, you'll see the cost for the two VMs added together.
Resource group Select one or more resource groups.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen resource group.
Subscription Select one or more subscriptions from the dropdown box if you wish to restrict results to only one or more subscriptions. When this is not used results are shown across all subscriptions.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen subscription.
Tags Select items with a particular tag. Add the tag name and the tag value you want to use to search for. If you select multiple tags, the search automatically 'ANDs' the tags which means the scope only contains items which are tagged with all the tags listed.
Filter by type:
Tick filter by type to only show resources of a particular type within the chosen tag(s).
Type Scope type can be used to show all resources of a particular type, for example all databases across all subscriptions, by typing
databases
and selectingSQL databases
.Show hidden types This works in the same way as the Show hidden types option in the Azure portal.
Hidden types include some ancillary resources which are created/managed by Azure infrastructure. It might be useful to display these resources when cleaning up your resource groups or subscriptions.
Scope options on perspectivesNote: If you never used a perspective, you should read Working with perspectives before scoping tiles on perspectives.
The power of perspectives is that tiles on a perspective can use a dynamic scope. A dynamic scope considers the currently viewed
resource . A dynamic scope consists of two different states:the configuration of the scope in the tile (for example, "consider child objects of type logical disk for the currently viewed object")
the actual resolved scope that depends on which
resource you are currently viewing ("this object has 5 child objects of type logical disk")
After configuring the dynamic scope once in the tile, you'll get different results depending how the scope is resolved on the different
resources you are viewing.On perspectives, you can scope tiles to:
this resource
(only on perspectives for resources)The tile's scope will be the resolved to the resource that is currently viewed. child resources
(only on perspectives for resource groups and subscriptions)When you select this option, the scope of the tile will be resolved to all resources that are in the group or subscription that is currently viewed.
If you want to narrow the scope down to a specific type of resource in the group or subscription, you can filter for one specific type of resource.
other resources Gives you the normal, non-dynamic scope options you are used to when scoping tiles on dashboards. This means the tile will not dynamically adapt it's content to the currently viewed
resource , it will always show data for the staticresource picked here.Since the power of perspectives is that their tiles can show data for different
resources depending on whatresource is currently being viewed, you should only select this option when you are sure that there is no relationship between the desired scope and the currently viewedresource .Configure the settings for the visualization you chose:
Settings for ScalarsTimeframe
The timeframe section allows you to determine the timeframe for the data. You can choose either to use page timeframe, which allows users viewing the page to change the timeframe on the fly, or for you to set a fixed specific timeframe which will ignore the page timeframe settings.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.Scalar
Scalar
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 Line GraphsAggregate
Removing the aggregate tick for a Cost Line Graph will show a line for each cost rather than one total cost line.
Timeframe
The timeframe section allows you to determine the timeframe for the data. You can choose either to use page timeframe, which allows users viewing the page to change the timeframe on the fly, or for you to set a fixed specific timeframe which will ignore the page timeframe settings.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.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.
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 TreemapsTimeframe
The timeframe section allows you to determine the timeframe for the data. You can choose either to use page timeframe, which allows users viewing the page to change the timeframe on the fly, or for you to set a fixed specific timeframe which will ignore the page timeframe settings.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.Display
Height: Allows you to set the height of the tile with a slider.
Show hierarchy:
Sorts the blocks of the treemap with a hierarchy. Results that belong to other results will be shown underneath them. For example, a workflow that belongs to a subscription will be shown underneath that subscription.
Show unit:
Shows the units of the metrics in the treemap (if available).
Color
The color section allows you to choose how the Treemap and Sun Burst graphs are displayed.
Color by:
subscription Results that belong to the same subscription will be shown in the same color. resource group Results that belong to the same resource group will be shown in the same color. type Results that belong to the same type will be shown in the same color. none All results will be shown in the same color. Label
name Use the name as the label.
type Use the type as the label. 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
name Use the name as the label.
type Use the type as the label. 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 Sun BurstsTimeframe
The timeframe section allows you to determine the timeframe for the data. You can choose either to use page timeframe, which allows users viewing the page to change the timeframe on the fly, or for you to set a fixed specific timeframe which will ignore the page timeframe settings.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.Display
Height: Allows you to set the height of the tile with a slider.
Order by:
Here you can decide if you want the results to be ordered by hierarchy or by size.
Color
The color section allows you to choose how the Treemap and Sun Burst graphs are displayed.
Color by:
subscription Results that belong to the same subscription will be shown in the same color. resource group Results that belong to the same resource group will be shown in the same color. type Results that belong to the same type will be shown in the same color. none All results will be shown in the same color. Settings for Utilization TreemapsMetric
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).
The drop-down list will show you a list of all metrics available for the scope you have set. Press the down arrow on your keyboard in the choose metric field to see the list.
If no metrics are listed and the tile is showing the message
Resources must all be of the same type
go to the Scope panel and check that the resources are all of the same type, such asvirtual machines
. For example, if you have selected a resource group in the scope you should tick filter by type to ensure that only resources of one type are returned.For more information about metrics available see Azure Monitor Metrics Overview and Supported metrics with Azure Monitor. Dashboard Server does not support metric namespaces. For more information see Azure Monitor Metrics Data Structure.
After you've chosen a metric, you'll see more options:
Interval
Allows you to select the interval at which you would like to see data points. For example, data points a minute apart, 30 minutes apart, or a day apart.Aggregation
Allows you to control how the data is aggregated when using intervals over 1 minute. For example, if using an interval of an hour would you like to the 60 data points collected in each hour to be aggregated together to show you one point for that hour that is the average figure, or the maximum figure.Custom label:
Allows you to specify the metric label.Dimension
In Azure some metrics may have multiple dimensions. Dimensions of a metric are name-value pairs that carry additional data to describe the metric value. For more information see Azure Monitor Metrics Data Structure.
In Dashboard Server version 4.5 and above you can choose to split and/or filter results using these dimensions. For more information see this Microsoft article Filtering and splitting.
Apply splitting:
Splitting by a dimension allows you to see a different line for the data for each different value that the chosen dimension has.
When you tick apply splitting you will see a list of all of the dimensions that the scope contains.
Select which dimensions you want to split by, and the data will separate by the different values that the dimension has.
Filter by dimension:
Filtering to a dimension's specific value allows you to see a line that only contains the data for the dimension value that is important to you.
For a metric that has dimensions go into the dimension panel and tick filter by dimension.
Click the add button and a drop down list will allow you to choose your dimension and type in the value of the dimension on the box. This will show you a line that only contains data for the chosen value.
Timeframe
The timeframe section allows you to determine the timeframe for the data. You can choose either to use page timeframe, which allows users viewing the page to change the timeframe on the fly, or for you to set a fixed specific timeframe which will ignore the page timeframe settings.
What is the page timeframe?The page timeframe is the timeframe setting a dashboard
or perspective is currently using. When a user changes the page timeframe, all tiles that use the page timeframe will adapt to the new timeframe. Tiles that don't use the dynamic page timeframe aren't affected and won't change.Display
Height: Allows you to set the height of the tile with a slider.
Show hierarchy:
Sorts the blocks of the treemap with a hierarchy. Results that belong to other results will be shown underneath them. For example, a workflow that belongs to a subscription will be shown underneath that subscription.
Show unit:
Shows the units of the metrics in the treemap (if available).
Color
The color section allows you to choose how the Treemap and Sun Burst graphs are displayed.
Color by:
subscription Results that belong to the same subscription will be shown in the same color. resource group Results that belong to the same resource group will be shown in the same color. type Results that belong to the same type will be shown in the same color. none All results will be shown in the same color. 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.
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
name Use the name as the label.
type Use the type as the label. 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
name Use the name as the label.
type Use the type as the label. 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}}
Walkthrough: Using the Utilization Treemap to show a heated treemap of cost and percentage CPU
This walkthrough shows you how to add a Utilization Treemap tile to a dashboard.
In Dashboard Server navigate to where you'd like the dashboard to be created. Hover over the + button and click dashboard.
Give the dashboard a title, by replacing the text that says New Dashboard.
The dashboard is saved as you go along so there's no need to save your changes. You can find your dashboard by clicking on the right-hand menu ☰ > system > unpublished.
A new tile has already been added to the dashboard. Edit the title by overwriting the placeholder value New tile with your own title.
The tile selector will already be open. Click Cost Management.
Click on the Utilization Treemap button.
Next we need to scope the tile. In the scope section add a resource group or subscription.
Tick filter by type and in the box type
Virtual machines
.In the metric section select a suitable metric such as
Percentage CPU
. At this point you should see a Utilization Treemap.
The size is the cost representation, and the color is the metric. By default the metric value is the average for the timeframe selected, in this case the average for the last 30 days, so we'll change this to maximum next.Under aggregation click on maximum
Click on the color section and change the color if you wish. The darker the color the higher the metric value, in this case the higher the percentage CPU. So we can look for large rectangles (high cost) with pale color (low CPU use) to see if there are VMs we are under-utilising.
Click done.
Limitations
- Amortized costs for reserved instances cannot be viewed in Dashboard Server (SQ-3376)
- Deleted resources are not included when scoping the Cost Management tile leading to discrepancies with the Azure Portal (SQ-1449)
- The calculated totals for Treemap and Sunburst tiles do not include the cost of each item that, over the selected timeframe, does not exceed 0.50 in the currency unit for that item (SQ-2527)
- Dashboard Server Azure Edition does not currently support Azure Cost Management’s cost allocation rules (SQ-3049)