Azure plugin
Monitor your Azure environment, VMs, Functions, Cost and more.
How to add the Azure plugin
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 plugin to SquaredUp
In SquaredUp browse to Settings > Plugins > Add plugin and search for the plugin.
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.
Leave the checkbox for Automatically create a workspace ticked, this will create a new workspace for this plugin containing out of the box dashboards and scopes.
Optionally, select whether you would like to restrict access to this plugin instance. By default, restricted access is set to off.
Restrict access to this plugin?
The term plugin here really means plugin instance. For example, a user may configure two instances of the AWS plugin, one for their development environment and one for production. In that case, each plugin instance has its own access control settings.
By default, Restrict access to this plugin? is set to off. The plugin can be viewed, edited and administered by anyone. If you would like to control who has access to this plugin, switch Restrict access to this plugin? to on.
Use the Restrict access to this plugin? dropdown to control who has access to the workspace:
By default, the user setting the permissions for the plugin will be given Full Control and the Everyone group will be given Link to workspace permissions.
Tailor access to the plugin, 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 plugin 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 Cloud. 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 plugin, regardless of the ACL chosen.
Plugin access levels
Access Level:
Link to workspace
- User can link the plugin to any workspace they have at least Editor permissions for.
- Data from the plugin can then be viewed by anyone with any access to the workspace.
User can share the plugin data with anyone they want.
User cannot configure the plugin in any way, or delete it.
Full Control - User can change the plugin configuration, ACL, and delete the plugin.
See Access control for more information.
Click Test and save to validate the plugin 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 plugin with warnings. Select Save with warnings if you believe that you can still use the plugin as required with the warnings listed. Alternatively, address the issues listed and then select Rerun tests to validate the plugin configuration again. If the validation now passes, click Save.
Testing Failed – errors will be listed and potential fixes suggested. You cannot use the plugin with errors. You are able to select Save with errors if you believe that a system outside of SquaredUp Cloud is causing the error that you need to fix. Alternatively, address the issues listed and then select Rerun tests to validate the plugin configuration again. If the validation now passes, click Save.
You can edit any plugin configurations at any time from Settings > Plugins.
Using the Azure plugin
Data Streams

A data stream brings you data to answer a specific question like "What's the health state of the objects?", "What kind of alerts are coming from this plugin for my servers?", "What's the average memory usage of this app?"
The magic of data streams is that they 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.
There are two types of data streams available for this plugin:
Data streams installed with the plugin, see Azure Cost Data Streams
Configurable data streams, see Using Configurable data streams with the Azure plugin
Using Configurable data streams with the Azure plugin

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 + before the name, and once new data streams have been created they show in the normal list of data streams.
Any data streams you create can be edited from Settings > Data Streams.
There are five types of configurable data streams available for this plugin:
+ 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.
Scope to an Azure object.
Select + Monitor Metric from the data stream list.
Enter a Display Name for the new data stream.
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.
Scope to a Azure workspace, object that supports KQL queries, or the plugin instance itself.
If you scope to an Azure Application Insights workspace, the name of the data stream will be + Query. If you scope to an Azure object or the plugin itself, the name of the data stream will be + Application Insights Query.
Depending on what you have scoped to, select + Application Insights Query or + Query from the data stream list.
Enter a Display Name for the new data stream.
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 plugin instance itself.
Supports mustache parameters
A mustache parameter is a dynamic value, the actual value will be inserted from the properties of the object(s) in scope.
This data stream supplies scoped objects individually for mustache parameters. When there are multiple objects in scope this plugin 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
.
Log Analytics Query
This data stream calls the api.loganalytics.io
endpoint, and allows you to enter a custom log analytics KQL query.
Scope to a Azure workspace, object that supports KQL queries, or the plugin instance itself.
If you scope to an Azure Log Analytics workspace, the name of the data stream will be + Query. If you scope to an Azure object or the plugin itself, the name of the data stream will be + Log Analytics Query.
Depending on what you have scoped to, select + Log Analytics Query or + Query from the data stream list.
Enter a Display Name for the new data stream.
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 plugin instance itself.
Supports mustache parameters supplied in an array
A mustache parameter is a dynamic value, the actual value will be inserted from the properties 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 plugin 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
.
Cost
This data stream calls the Azure Cost Management query Microsoft: Query - Usage - REST API (Azure Cost Management).
Scope to Azure subscriptions, resource groups or management groups.
Select + Cost from the data stream list.
Enter a Display Name for the new data stream.
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.
Azure Cost Data Streams
This plugin 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.