You are here

Azure Custom Monitoring

Requires Opsview Cloud or Opsview Monitor 6
check_circle
Opsview Supported

Azure - Custom Opspack

Microsoft Azure is a cloud computing service created for building, testing, deploying and managing applications and services through a global network of Microsoft-managed data centers. It provides software as a service (SAAS), platform as a service and infrastructure as a service and supports many different programming languages, tools and frameworks including both Microsoft-specific and third-party software and systems.

What You Can Monitor

Opsview Monitor's Azure Generic Opspack provides you with the tools to monitor any supported "Azure Monitor" metric. Easily integrate your custom defined Azure metrics within a few clicks.

Service Checks

Service Check Description
Azure-Generic Generic Metric details

Setup Azure for Monitoring

This Opspack requires Administrator access on Azure. You need to retrieve the following credentials:

  • Subscription ID
  • Tenant/Directory ID
  • Client/Application ID
  • Secret Key

Step 1: Find Subscription ID

The Subscription ID can be found in the Subscriptions section under the All services section from the Azure dashboard

Azure Find Subscription Step 1

Azure Find Subscription Step 2

Step 2 : Find the Tenant/Directory ID

The Tenant/Directory ID can be found in the Azure Active Directory under the Properties section from the Azure dashboard

Azure Find Directory ID

Step 3: Find the Client/Application ID for your application

You need to create and register your application if you haven't already. Use the following documentation from Microsoft: Create an Azure Active Directory application

The Client/Application ID can be found in Azure Active Directory under the App registrations section from the Azure dashboard

Azure Find Application ID

Step 4: Generate the Secret Key for your application

You will need to create a Secret Key for your application, once this has been created its value will be hidden so save the value during creation

To create the Secret Key, select your application from the list, select the Settings within your application and then select the Keys option

There you can create a new key by adding the description and expiration period and the value will be generated

Azure Create Secret Key

Step 5: Provide access to the subscription you wish to monitor

Navigate to the Subscriptions section and select the Subscription you selected before

In the Subscription to be monitored, click Access Control (IAM)

Then click the Add button, select Monitoring Contributor and select the application

Azure Add Subscription

Azure Add Role

If you are running more than one subscription these steps will need to be done for each one you wish to monitor

Setup and Configuration

To configure and utilize this Opspack, you simply need to add the 'Cloud - Azure - Generic' Opspack to your Opsview Monitor system and configure your Host Variables.

Step 1: Add the Host Template

Add the Cloud - Azure - Generic Host Template to your Opsview Monitor host.

For more information, refer to Opsview Knowledge Center - Adding Host Templates to Hosts.

Step 2: Add and configure variables required for this host

First, ensure that the "Primary Hostname/IP" field of your host exactly matches the name of the Azure resource you are requesting metrics from.

Refer to Host Configuration for more details.

Add the 'AZURE_CREDENTIALS' Variable to the host. In the Value column, add the name of the Azure Resource Group your resource resides in. Then override the Subscription ID, Client ID, Secret Key and Tenant ID to match the values retrieved earlier.

Add the 'AZURE_SEARCH_VALUES' Variable to the host. To fill in this Variable, you will need to refer to the Azure Monitor supported metric documentation from Microsoft, which details the available options for every supported resource. For example, the following section of the linked documentation lists the supported metrics for Azure Virtual Machines:

Azure Monitor Supported Metrics

In Opsview, in the Value column for the 'AZURE_SEARCH_VALUES' Variable, add the name of the desired metric you want to monitor - the section labelled in the screenshot above as "Metric Name".

Then, override the Provider field with the appropriate Azure Monitor metric provider for your desired metric. Note that this is not the same as a "Metric Namespace". Each supported metric for your resource should be listed under the correct provider in the Azure Monitor documentation - you can see it labelled above in the screenshot.

Then, override the Aggregation field with the correct aggregation string for your desired metric, also taken from the Azure Monitor supported metric documentation. This is also labelled above.

Finally, override the UOM field with the unit of measurement you want this metric to use within Opsview, used for display and graphing purposes. This does not have to match the contents of the "Unit" column shown above - for instance, you could use "B" rather than "Bytes".

Full Example:

To set up a custom metric for an Azure Virtual Machine called 'myazurevm' within the Resource Group 'myresgroup', my Host should be set up with the following values for "Primary Address/IP", and the "Cloud - Azure - Generic" Host Template:

Host Setup

with the following "Host Check Command" (in the "Advanced" section):

Host Setup Dropdown

and the 'AZURE_CREDENTIALS' Variable should look like:

Azure Credentials Setup

If the desired metric is the "OS Disk IOPS Consumed Percentage", then the 'AZURE_SEARCH_VALUES' Variable should be set up as:

Azure Search Values Setup

This will result in the following Service Check output format:

METRIC OK - OS Disk IOPS Consumed Percentage is 5% | 'OS Disk IOPS Consumed Percentage'=5%

Step 3: Apply changes and the system will now be monitored

Azure Custom Service Checks