# Azure Monitor Metrics

Contents

* [Configure Azure](#configuring-azure)
* [Configuring Hosted Graphite](#configuring-hosted-graphite)
  * [Enabling Azure Add-0n](#enabling-the-azure-add-on)
  * [Additional Configs](#additional-configs)
    * [Tags](#tags)
    * [Account Naming](#enabling-account-naming)
* [Metric Name Mapping](#metric-name-mapping)
* [Azure Overview Dashboard](#azure-overview-dashboard)
* [Disabling the Azure Add-0n](#disabling-the-azure-add-on)
* [Disclaimer](#disclaimer)

{% embed url="<https://www.youtube.com/watch?t=2s&v=u9Zla_hLI8A>" %}
Azure Video Tutorial
{% endembed %}

### [Configuring](#configuring-aws)[ Azure](#configuring-azure)

To connect to your Azure account, you need to provide the following information:

* [Tenant ID](#tenant-id)
* [Subscription ID](#subscription)[s](#subscription)
* [Client Info (ID and Secret)](#client-info)
* [Role](#role)

#### [Tenant ID](#tenant-id)

Search for 'Active Directory' in the search bar which should take you to the tenant overview. Here you will be able to find the tenant id.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F8wP9HTpctNiNJNsZ63Gr%2FScreenshot%202023-09-13%20at%2012.09.15%20PM.png?alt=media&#x26;token=1c26df5d-484c-4d11-8a07-c310cc6c6150" alt=""><figcaption></figcaption></figure>

#### [Subscription](#subscription)

Within the subscription service interface, access the IDs by navigating to the "Overview" tab. Ensure you provide all the necessary IDs for the subscriptions from which you intend to retrieve metrics.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2Fh4BY9MFfQPzmSvsNL1nP%2FScreenshot%202023-09-13%20at%201.15.27%20PM.png?alt=media&#x26;token=9a5565e2-a850-4e04-ae87-c8b59bfdfb6f" alt=""><figcaption></figcaption></figure>

#### [Client ](#client-id)[Info](#client-info)

To get the Client ID along with the Client Secret, an application will need to be registered, this will act as authentication allowing Hosted Graphite to pull metrics.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FAqv6NCqlRBTttEAtRRjk%2FScreenshot%202023-09-13%20at%201.24.59%20PM.png?alt=media&#x26;token=d38f6f7c-cfee-45af-9af3-783db9b3cde5" alt=""><figcaption></figcaption></figure>

Once the App has been created, the Client ID can be obtained from the overview tab.

A Client Secret will need to be generated for the app. Navigate to the 'Certificate & Secrets' tab on the right. The Client Secret will be the under the 'value' column.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FRpEp8Fe6gQ4Yk4UqLayb%2FScreenshot%202023-09-14%20at%207.59.13%20PM.png?alt=media&#x26;token=c19a5920-9386-4128-9e10-51debd4b2ae9" alt=""><figcaption></figcaption></figure>

#### [Role](#role)

The last step is to add permissions to the subscription, this will pass down the permission to all groups and resources within the subscription.

Back in the subscription overview navigate to 'Access Control (IAM)'. The role required to pull the metrics is 'Reader'.&#x20;

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FxLnThcHQJfJJVWLcBf0y%2FScreenshot%202023-09-14%20at%208.00.40%20PM.png?alt=media&#x26;token=7e815197-b0eb-450e-b983-bffd8266cf39" alt=""><figcaption></figcaption></figure>

In the members section make sure to include the App that was created in the previous step. Review and sign the role assignment.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FFvJmgDdfHnroWAgwwWW7%2FScreenshot%202023-09-14%20at%208.01.15%20PM.png?alt=media&#x26;token=39e31685-6890-44bd-8892-a5777452fed7" alt=""><figcaption></figcaption></figure>

### [Configuring Hosted Graphite](#configuring-hosted-graphite)

#### [Enabling The Azure Add-On](#enabling-the-azure-add-on)

To enable the Azure add-on, go to the [add-ons](https://www.hostedgraphite.com/app/addons/) page in your Hosted Graphite account and choose the option for **Azure**.

You will be presented with the following page; here you will be able to add, edit, and delete any Azure configurations. This page also provides options to add account names and tags.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2FUtkCyI5BrkdLdxGzwPku%2FScreenshot%202023-09-13%20at%201.53.37%20PM.png?alt=media&#x26;token=6971a18a-c86b-444a-9f1a-5c2bd9eff2c7" alt=""><figcaption></figcaption></figure>

The main Azure configuration page looks like the following:

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F6CyHhfgZqwsOuDnGj5jp%2FScreenshot%202023-09-13%20at%202.59.48%20PM.png?alt=media&#x26;token=c882287c-f179-4989-9b89-30e272e21073" alt=""><figcaption></figcaption></figure>

Before saving make sure to include the resource to monitor by selecting the enable checkbox. Tagging is also a feature that can be enabled. If 'Tags' checkbox is enabled then tagging will only be applied to that specific resource. If you don't want tagging to be enabled for a resource then leave it unselected.

More information on the available metrics can be viewed [here](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/metrics-index). If you require a specific resource that is not listed, please don't hesitate to email us and we'll work swiftly to add it.

### [Additional Configs](#additional-configs)

#### [Tags](#tags)

If you click **Azure Tags** you will be presented with the following screen which allows you to edit tags. Each tag has a unique name (shown on the left) and one or more values. Values are separated by a comma.&#x20;

**Example**: Entering “Tag\_Next”: “hello, world” will configure the Add-On to only pull metrics from resources that have the tag “Tag\_Next” and at least one of the matching values of "hello" or "world" for that tag.

If tagging is not selected for any services, but tags are configured for the Add-On, it will act as if tagging is enabled for all services.

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F94R6iAPd42emOA6WV8lj%2FScreenshot%202023-09-15%20at%202.02.25%20PM.png?alt=media&#x26;token=f23ac24c-1f17-4e16-bd32-c7a3de40d77b" alt=""><figcaption></figcaption></figure>

[Enabling Account Naming](#enabling-account-naming)

If you use multiple Azure Client IDs on your Hosted Graphite account for different Azure accounts, projects or environments, you can keep the metrics separated by assigning **Account Names** to your Client IDs.

Under the list of Client IDs on your HG account, there’s a button to access the Account Names interface. There you can assign names to your Client IDs, which will then become part of the metric name for all metrics retrieved using that ID.&#x20;

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F4ZWKK590YBxL722zWtqY%2FScreenshot%202023-09-14%20at%2011.27.53%20AM.png?alt=media&#x26;token=200f11f1-3f6c-4253-9672-5a2ec12850bf" alt=""><figcaption></figcaption></figure>

### [Metric Name Mapping](#metric-name-mapping)

The Azure metrics for each service are mapped to Hosted Graphite metric names as follows:

```bash
azure.{tenant_id}.{subscription_id}.{resource_group}.{namespace}.{resource_name}.{region}.{metricname}
```

If AccountName is enabled then the tenant\_id will be replaced by the account name provided.

### [Azure Overview Dashboard](#azure-overview-dashboard)

This can be found and generated from within the [Dashboard Library](https://docs.hostedgraphite.com/dashboard-and-graphs/dashboard-library), and offers a great starting point for monitoring your Azure services!

<figure><img src="https://495119770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZtHmoGZNsmARIViZEdbz%2Fuploads%2F4L2mw21yZkDrEe21B7WT%2Fazure-overview-dashboard.png?alt=media&#x26;token=8fd7e374-2c20-4726-a8d0-34df39dfad65" alt=""><figcaption></figcaption></figure>

This overview dashboard assumes that you have enabled Account Names, which can be configured in Add-Ons => Azure.

### [Disabling The Azure Add-On](#disabling-the-azure-add-on)

Go to the [add-ons](https://www.hostedgraphite.com/app/addons/) page in your Hosted Graphite account, and choose the option for **Azure**.

Click the **Delete** button and the Azure add-on will be disabled for that account.

### [Disclaimer](#disclaimer)

While we attempt to minimize the number of API calls that may incur Azure charges, Hosted Graphite disclaims responsibility for potential costs incurred by the use of this add-on. For more information please review Azure's API [cost](https://azure.microsoft.com/en-us/pricing/details/monitor/) and [rate-limiting ](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/request-limits-and-throttling#subscription-and-tenant-limits)information

Our add-on performs read-only requests to the Azure Monitor API. Should the provided [Azure Credentials ](#configuring-azure)grant greater privileges than what is specified in [Role](#role), responsibility for any activity performed using those keys lies with the customer.
