Cloud - Azure - Generic 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 Copied

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 Copied

Service Check Description
Azure - Generic Generic Metric details.

Setup Azure for Monitoring Copied

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

Find Subscription ID Copied

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

Find Azure Subscription ID

Find Azure Subscription ID

Find the Tenant/Directory ID Copied

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

Find Azure Tenant/Directory ID

Find the Client/Application ID for your application Copied

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

Find Azure Client/Application ID

Generate the Secret Key for your application Copied

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

Create Secret Key

Provide access to the subscription you wish to monitor Copied

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

Add Subscription to Application

Add Subscription to Application

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 Copied

Add the Host Template Copied

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

Note

For more information, refer to the documentation on Adding Host Templates to Hosts.

Add and configure variables required for this host Copied

First, ensure that the Primary Hostname/IP field of your host exactly matches the name of the Azure resource you are requesting metrics from. Since this is not actually a hostname or IP address, we recommend you additionally set your Host Check Command to beAlways assumed to be UP to prevent Opsview considering the Host as DOWN.

Note

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:

View Output

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:

View Output

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

View Output

and the AZURE_CREDENTIALS Variable should look like:

View Output

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

View Output

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%

Apply Changes Copied

Apply Changes and the custom metric will then be monitored:

View Output

Plugin help Copied

Secure Args

The check_azure.py plugin uses the Secure Args feature for argument passing.
["Opsview On-Premises"] ["Opsview > Opspacks"] ["User Guide", "Technical Reference"]

Was this topic helpful?