Skip to content

Azure Metrics

Overview

Microsoft Azure provides built-in monitoring and observability tools that allow users to collect and analyze metrics and logs from their Azure resources. Send Azure metrics seamlessly to Coralogix. Search, analyze, and visualize your data, gaining insights into application behavior, identifying errors, and troubleshooting problems.

For more information about this integration, click here.

How to use with Terraform

To deploy this integration using Terraform, you can use the coralogix_integration resource provided by the Coralogix Terraform provider. Below is an example configuration:

resource "coralogix_integration" "azure-metrics-collector" {
  integration_key = "azure-metrics-collector"
  version         = "1.6.0"

  parameters = {
    IntegrationName          = "AzureMetricsCollector"

    AuthorizationEnabled     = false
    TenantId                 = "<TenantId>"
    ClientId                 = <ClientId>
    ClientSecret             = <ClientSecret>
    DiscoverSubscriptions    = true

    ApplicationName          = "azure"
    SubsystemName            = "myapp"

    EnableServiceBusMetrics  = false
    EnableUsageMetrics       = true

    ResourceTagFilter     = "env:^prod$, system:(?i)prod, monitored, !testonly"
  }
}

Replace the placeholder values with your actual configuration parameters. Refer to the parameter table below for required fields and their descriptions.

Revisions

1.6.0

New configuration option for filtering resources by tags

NameTypeRequiredDescription
IntegrationNameStringYesName identifying the integration.
TenantIdStringYesThe tenant ID found in the Azure app registration.
ClientIdStringNoThe client ID found in the Azure app registration.
AuthorizationEnabledBooleanNoTrue to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret.
ClientSecretStringNoThe client secret, if AuthorizationEnabled is false.
DiscoverSubscriptionsBooleanYesMetrics will be collected for all visible subscriptions.
SubscriptionIdsListNoList of Subscription IDs for which to collect metrics. Must be present if DiscoverSubscriptions is false. Not allowed if DiscoverSubscriptions is true.
ResourceNameFilterStringNoSpecify a RegEx to serve as a filter based on the name of the Azure resource being monitored.
ResourceTagFilterStringNoOnly metrics for resources with tags matching the filter will be ingested. The filter is a comma-separated list of key or key:regex expressions. Prefix with ! to negate. Example: env:^prod$, env2:(?i)prod, !scope:"main scope", monitored, !testonly
ResourceTypesListNoSelect one or more Resource Types to filter the available options for the Metric Namespaces. If left unselected, all Metric Namespaces will be available. This option does not control what would be collected, it will only filter available options in Select Metric Namespaces.
MetricNamespacesListNoSpecify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics.
ApplicationNameStringNoThe default name of the application that the integration will be used with. This is used as a fallback when no labels match.
ApplicationLabelsListNoSelect labels whose values will be used as the Application Name. If more than one label can be matched, the first match in the list will be used.
SubsystemNameStringNoThe default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match.
SubsystemLabelsListNoSelect labels whose values will be used as the Subsystem Name. If more than one label can be matched, the first match in the list will be used.
EnableServiceBusMetricsBooleanYesCreate metrics from Azure ServiceBus statistics.
EnableUsageMetricsBooleanYesCreate metrics from Azure Compute usage data.
EnableVirtualNetworksMetricsBooleanNoCreate metrics from Azure Virtual networks data.
EnableSubscriptionLabelBooleanNoAdd subscription_name label to metrics.
1.5.0

More subscription configuration options:

  • An integration can have multiple subscriptions.
  • Subscriptions can be added manually or auto-discovered by the integration.
  • Metrics can optionally include a subscription_name label.
NameTypeRequiredDescription
IntegrationNameStringYesName identifying the integration.
TenantIdStringYesThe tenant ID found in the Azure app registration.
ClientIdStringNoThe client ID found in the Azure app registration.
AuthorizationEnabledBooleanNoTrue to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret.
ClientSecretStringNoThe client secret, if AuthorizationEnabled is false.
DiscoverSubscriptionsBooleanYesMetrics will be collected for all visible subscriptions.
SubscriptionIdsListNoList of Subscription IDs for which to collect metrics. Must be present if DiscoverSubscriptions is false. Not allowed if DiscoverSubscriptions is true.
ResourceNameFilterStringNoSpecify a RegEx to serve as a filter based on the name of the Azure resource being monitored.
ResourceTypesListNoSelect one or more Resource Types to filter the available options for the Metric Namespaces. If left unselected, all Metric Namespaces will be available. This option does not control what would be collected, it will only filter available options in Select Metric Namespaces.
MetricNamespacesListNoSpecify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics.
ApplicationNameStringNoThe default name of the application that the integration will be used with. This is used as a fallback when no labels match.
ApplicationLabelsListNoSelect labels whose values will be used as the Application Name. If more than one label can be matched, the first match in the list will be used.
SubsystemNameStringNoThe default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match.
SubsystemLabelsListNoSelect labels whose values will be used as the Subsystem Name. If more than one label can be matched, the first match in the list will be used.
EnableServiceBusMetricsBooleanYesCreate metrics from Azure ServiceBus statistics.
EnableUsageMetricsBooleanYesCreate metrics from Azure Compute usage data.
EnableVirtualNetworksMetricsBooleanNoCreate metrics from Azure Virtual networks data.
EnableSubscriptionLabelBooleanNoAdd subscription_name label to metrics.
1.4.0

Metrics in namespaces Microsoft.Storage/storageAccounts/queueServices, Microsoft.Storage/storageAccounts/fileServices, Microsoft.Storage/storageAccounts/blobServices and Microsoft.Storage/storageAccounts/tableServices were not collected. This is fixed in this version. This could lead to more API calls and more ingested metrics. Note that the metrics will be collected only if the corresponding namespaces are selected in the configuration.

Parameters are the same as in 1.3.0

1.3.0

In this release, a new authorization method is introduced, eliminating the need to create and share a client secret.

How it works:

  1. During setup, you are asked to grant tenant-wide admin consent to the application provided by Coralogix, which creates a corresponding service principal for your integration.
  2. You need to assign the Monitoring Reader role to this principal at your subscription level, allowing it to read metrics from your Azure resources.

You can choose which authorization method to use. The previous flow, based on client secret is still supported.

Note: When you begin setting up a new account, data collection will pause until the setup is complete, resulting in a temporary data lag. Additionally, Azure IAM permission changes may take a few minutes to take effect.

NameTypeRequiredDescription
IntegrationNameStringYesName identifying the integration.
TenantIdStringYesThe tenant ID found in the Azure app registration.
ClientIdStringNoThe client ID found in the Azure app registration.
AuthorizationEnabledBooleanNoTrue to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret.
ClientSecretStringNoThe client secret, if AuthorizationEnabled is false.
SubscriptionIdStringYesSubscription ID for which to collect metrics.
ResourceNameFilterStringNoSpecify a RegEx to serve as a filter based on the name of the Azure resource being monitored.
ResourceTypesListNoSelect one or more Resource Types to filter the available options for the Metric Namespaces. If left unselected, all Metric Namespaces will be available. This option does not control what would be collected, it will only filter available options in Select Metric Namespaces.
MetricNamespacesListNoSpecify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics.
ApplicationNameStringNoThe default name of the application that the integration will be used with. This is used as a fallback when no labels match.
ApplicationLabelsListNoSelect labels whose values will be used as the Application Name. If more than one label can be matched, the first match in the list will be used.
SubsystemNameStringNoThe default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match.
SubsystemLabelsListNoSelect labels whose values will be used as the Subsystem Name. If more than one label can be matched, the first match in the list will be used.
EnableServiceBusMetricsBooleanYesCreate metrics from Azure ServiceBus statistics.
EnableUsageMetricsBooleanYesCreate metrics from Azure Compute usage data.
EnableVirtualNetworksMetricsBooleanNoCreate metrics from Azure Virtual networks data.