Azure plugin
Visit our website to see the data that you can access if you use this plugin to add the data source to SquaredUp:
Monitor your Azure environment, VMs, Functions, Cost and more.
How to add an Azure data source
Setup App Registration
Log in to the Azure portal.
In App registrations create a new app registration, using the default options (no redirect URL is needed).
Make a note of the Application (client) ID and the Directory (tenant) ID.
In Certificates and secrets add a new secret, and make a note of the value.
For more information see Microsoft: Use the portal to create an Azure AD application and service principal that can access resources
Configure App Registration access to your Azure resources
Navigate to the Subscription or Resource Group that you want to integrate and view in SquaredUp.
Make a note of the ID.
In Access control (IAM) click Add role assignments.
Choose the Reader role.
Search for the name of the app registration you created, select it and click Save.
You may also want to add the Cost Reader role if you want to use the Cost Data Stream.
Repeat these steps to integrate multiple subscriptions and resources groups.
Add the Azure data source to SquaredUp
In SquaredUp browse to Data Sources > Add data source and search for the data source. Alternatively, browse to Settings > Data Sources > Add data source.
Enter the Directory (tenant) ID, Application (client) ID, and Client secret noted down earlier.
The next two fields, Subscription IDs and Management Group IDs, are both optional, but at least one Subscription or Management Group is required.
Enter as many Subscription IDs as you require.
Enter as many Management Group IDs as you require.
Install Sample Dashboards:
Select whether you would like to install sample dashboards with the data source. By default, this is set to on.
Optionally, select whether you would like to restrict access to this data source instance. By default, restricted access is set to off.
Restrict access to this data source
The term data source here really means data source instance. For example, a user may configure two instances of the AWS data source, one for their development environment and one for production. In that case, each data source instance has its own access control settings.
By default, Restrict access to this data source? is set to off. The data source can be viewed, edited and administered by anyone. If you would like to control who has access to this data source, switch Restrict access to this data source? to on.
Use the Restrict access to this data source? dropdown to control who has access to the workspace:
By default, the user setting the permissions for the data source will be given Full Control and the Everyone group will be given Link to workspace permissions.
Tailor access to the data source, as required, by selecting individual users or user groups from the dropdown and giving them Link to workspace or Full Control permissions.
If the user is not available from the dropdown, you are able to invite them to the data source by typing in their email address and then clicking Add. The new user will then receive an email inviting them to create an account on SquaredUp. Once the account has been created, they will gain access to the tenant.
At least one user or group must be given Full Control.
Admin users can edit the configuration, modify the Access Control List (ACL) and delete the data source, regardless of the ACL chosen.
Data source access levels
Access Level:
Link to workspace
- User can link the data source to any workspace they have at least Editor permissions for.
- Data from the data source can then be viewed by anyone with any access to the workspace.
User can share the data source data with anyone they want.
User cannot configure the data source in any way, or delete it.
Full Control - User can change the data source configuration, ACL, and delete the data source.
See Access control for more information.
Click Test and add to validate the data source configuration.
Testing outcomes
Testing passed – a success message will be displayed and then the configuration will be saved.
Testing passed with warnings – warnings will be listed and potential fixes suggested. You can still use the data source with warnings. Select Save with warnings if you believe that you can still use the data source as required with the warnings listed. Alternatively, address the issues listed and then select Rerun tests to validate the data source configuration again. If the validation now passes, click Save.
Testing Failed – errors will be listed and potential fixes suggested. You cannot use the data source with errors. You are able to select Save with errors if you believe that a system outside of SquaredUp is causing the error that you need to fix. Alternatively, address the issues listed and then select Rerun tests to validate the data source configuration again. If the validation now passes, click Save.
You can edit any data source configurations at any time from Settings > Data Sources.
Using the Azure data streams

Data streams standardize data from all the different shapes and formats your tools use into a straightforward tabular format. While creating a tile you can tweak data streams by grouping or aggregating specific columns. Depending on the kind of data, SquaredUp will automatically suggest how to visualize the result, for example as a table or line graph.
Data streams can be either global or scoped:
Global data streams are unscoped and return information of a general nature (e.g. "Get the current number of unused hosts").
A scoped data stream gets information relevant to the specific set objects supplied in the tile scope (e.g. "Get the current session count for these hosts").
Data streams installed with the data source, see Azure Cost Data Streams
How to create a data stream for this data source:
Create a data stream using the configurable data stream form (simplest option) see Creating a data stream using the configurable data streams
Creating a data stream using the configurable data streams

A configurable data stream allows you to easily create new data streams specific to your needs, by entering information into a form, such as metric names or queries. Configurable data streams have a cog icon next to their name in the tile editor.
Any data stream you create can be edited by clicking the edit button (pencil) next to it in the tile editor, and also from Settings > Advanced > Data Streams.
There are five configurable data streams available for this data source:
+ Monitor Metric - Queries Azure Metrics, see Monitor Metric
+ Application Insights Query - Allows you to run an Application Insights KQL query, see Application Insights Query
+ Log Analytics Query - Allows you to run a Log Analytics KQL query, see Log Analytics Query
+ Query - Allows you to run a KQL query against the currently scoped Log Analytics or Application Insights workspace, see Application Insights Query or Log Analytics Query
+ Cost - Allows you to run an Azure Cost Management query, see Cost
Monitor Metric
This data stream calls the /{{sourceId}}/providers/microsoft.insights/metrics
endpoint, and allows you to select a custom metric name.
In the tile editor, filter by the Azure data source, select Monitor Metric from the data stream list and then click Next.
Select the objects that you want to use and then click Next.
Select a Metric Name from the dropdown, for example:
AverageResponseTime
.Any data stream you have created can later be edited from Settings > Data Streams. For example, you may wish to change the shape for timeseries metrics from
number
tomilliseconds
.
Application Insights Query
This data stream calls the api.applicationinsights.io
endpoint, and allows you to enter a custom application insights KQL query.
In the tile editor, filter by the Azure data source, select Application Insights Query from the data stream list and then click Next.
Select an Application Insights Workspace Name from the dropdown. This the name of the workspace that you wish to query.
You will not need to select a name if you have already scoped to a workspace.
Enter a KQL Query.
Mustache parameters are only supported if you have scoped to an Azure object and selected the + Application Insights Query. Mustache parameters are not supported if you have scoped to a workspace or the data source instance itself.
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted to replace the field in curly braces. For example,
{{timeframe.start}}
will insert the start time, or{{name}}
will insert the name of the object(s) in scope.This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this data source will send the query multiple times, once for each object. The results are then displayed together, for example in a single table.
You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.For example, if objects of type "host" have a property called
name
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.Optionally, enter a Timeframe, for example:
PT12H
.You must also tick Ignore dashboard timeframe if you want to use the custom timeframe you have entered here.
ignoreTimeFrame
parameterTicking Ignore dashboard timeframe adds the
ignoreTimeFrame
parameter to the data stream.You can add the
ignoreTimeFrame
parameter and set it totrue
if you want the query to ignore the current dashboard timeframe of a dashboard.
IfignoreTimeFrame
is left out or set to false, the query will use the current dashboard timeframe.What is the dashboard timeframe?
The dashboard timeframe is the current timeframe setting for a dashboard. Users can change the dashboard timeframe to see data for a different time span, for example, instead of showing data from "the last 12 hours" it can be changed to show data from "the last 7 days".
Tiles can be configured to:
Use dashboard timeframe (default). For these tiles the data shown will change when the user changes the dashboard timeframe.
Use a fixed timeframe from the options available. These tiles show a clock icon and hovering shows the fixed timeframe configured. The data will not change when the dashboard timeframe is changed.
Tip: Indicate with the name of a tile if the tile's timeframe can be changed. For example, naming a tile "Performance during the last week" tells users that this tile always shows data for the last week. Naming a tile just "Performance" indicates to users that changing the dashboard timeframe will change the data.
Optionally, enter an API Version, for example:
2017-10-01
.If an API Version is specified, the data stream will call the endpoint
https://management.azure.com/{{workspace ID}}/query
.Click Save.
Log Analytics Query
This data stream calls the api.loganalytics.io
endpoint, and allows you to enter a custom log analytics KQL query.
In the tile editor, filter by the Azure data source, select Log Analytics Query from the data stream list and then click Next.
Select a Log Analytics Workspace Name from the dropdown. This the name of the workspace that you wish to query.
You will not need to select a name if you have already scoped to a workspace.
Enter a KQL Query.
Mustache parameters are only supported if you have scoped to an Azure object and selected the + Log Analytics Query. Mustache parameters are not supported if you have scoped to a workspace or the data source instance itself.
Supports mustache parameters supplied in an array
A mustache parameter is a dynamic value, the actual value will be inserted to replace the field in curly braces. For example,
{{timeframe.start}}
will insert the start time, or{{name}}
will insert the name of the object(s) in scope.This data stream supplies scoped objects in an array for mustache parameters. When there are multiple objects in scope this data source will send the query once with all the objects in an array.
When the scoped objects are supplied in an array the normal mustache syntax, for example
{{name}}
, must be contained between{{#.}}
and{{/.}}
(the full-stop indicates that the whole object should be used, in this case the array of objects in scope).For example, a query where clause might look like:
Copy| where ComputerName in ( {{#.}} '{{name}}', {{/.}} '' )
The
{{#.}}
and{{/.}}
indicate that what is contained within is expanded for each element in the array of objects.You can use properties of objects and write them in between curly braces e.g
{{name}}
to use them as mustache parameters. For example, if objects of type "host" have a property calledname
, you can use{{name}}
. This will resolve{{name}}
to the value of the name property of the different "host" objects used in the scope.'{{name}}',
means that the name property is expanded inside single-quotes with a trailing comma.The trailing single quotes
''
are necessary to stop the query being rejected because a trailing comma is disallowed.Whenever you use mustache parameters, you need to use a scope of objects that contain the property you're referencing.
Optionally, enter a Timeframe, for example:
PT12H
.You must also tick Ignore dashboard timeframe if you want to use the custom timeframe you have entered here.
ignoreTimeFrame
parameterTicking Ignore dashboard timeframe adds the
ignoreTimeFrame
parameter to the data stream.You can add the
ignoreTimeFrame
parameter and set it totrue
if you want the query to ignore the current dashboard timeframe of a dashboard.
IfignoreTimeFrame
is left out or set to false, the query will use the current dashboard timeframe.What is the dashboard timeframe?
The dashboard timeframe is the current timeframe setting for a dashboard. Users can change the dashboard timeframe to see data for a different time span, for example, instead of showing data from "the last 12 hours" it can be changed to show data from "the last 7 days".
Tiles can be configured to:
Use dashboard timeframe (default). For these tiles the data shown will change when the user changes the dashboard timeframe.
Use a fixed timeframe from the options available. These tiles show a clock icon and hovering shows the fixed timeframe configured. The data will not change when the dashboard timeframe is changed.
Tip: Indicate with the name of a tile if the tile's timeframe can be changed. For example, naming a tile "Performance during the last week" tells users that this tile always shows data for the last week. Naming a tile just "Performance" indicates to users that changing the dashboard timeframe will change the data.
Optionally, enter an API Version, for example:
2017-10-01
.If an API Version is specified, the data stream will call the endpoint
https://management.azure.com/{{workspace ID}}/query
.Click Save.
Cost
This data stream calls the Azure Cost Management query Microsoft: Query - Usage - REST API (Azure Cost Management).
In the tile editor, filter by the Azure data source, select Cost from the data stream list and then click Next.
Select the objects that you want to use and then click Next.
Optionally, select a Group By entry from the dropdown. You can group the data by any dimension/s, for example
ResourceGroupName
.Optionally, select a Filter from the dropdown. By default the data is not being filtered. Create a filter if you want to filter data to a specific type of Resources.
Select Granularity from the dropdown. Available options are: Daily and None. Daily granularity is useful for when you want to see cost over time in the form of a line graph. None should be selected if you want to show the total cost in the form of donuts and bar charts.
Click Save.
Azure Cost Data Streams
This data source comes with several data streams that you can use in the tiles on your dashboards. Here you'll find tips and ideas for using the Azure Cost data streams to display the data you're interested in.
Cost Data Stream
This data stream gives you the daily cost over the timeframe you selected for your objects in your scope. You are able to get the total cost of the timeframe for the objects in your scope by grouping them together.
Cost - Forecast Data Stream
For the Cost - Forecast data stream to work you will need to set it to a date in the future, for example: This Month, This Quarter, This Year. The line graph will show 2 lines:
Daily cost over the selected time as Active cost up to today’s date,
Forecast line for the rest of the period.
Cost - Accumulative
Targets each node in the scope and shows actual and forecast accumulated cost over time. Each day is summary of the total cost so far. Set this data stream to a date in the future like: This Month, This Quarter, This Year. Shows the Actual cost for the timeline in the past and Forecast for the timeline in the future.
Comments
0 comments
Please sign in to leave a comment.