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
| Name | Type | Required | Description |
|---|---|---|---|
| IntegrationName | String | Yes | Name identifying the integration. |
| TenantId | String | Yes | The tenant ID found in the Azure app registration. |
| ClientId | String | No | The client ID found in the Azure app registration. |
| AuthorizationEnabled | Boolean | No | True to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret. |
| ClientSecret | String | No | The client secret, if AuthorizationEnabled is false. |
| DiscoverSubscriptions | Boolean | Yes | Metrics will be collected for all visible subscriptions. |
| SubscriptionIds | List | No | List of Subscription IDs for which to collect metrics. Must be present if DiscoverSubscriptions is false. Not allowed if DiscoverSubscriptions is true. |
| ResourceNameFilter | String | No | Specify a RegEx to serve as a filter based on the name of the Azure resource being monitored. |
| ResourceTagFilter | String | No | Only 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 |
| ResourceTypes | List | No | Select 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. |
| MetricNamespaces | List | No | Specify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics. |
| ApplicationName | String | No | The default name of the application that the integration will be used with. This is used as a fallback when no labels match. |
| ApplicationLabels | List | No | Select 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. |
| SubsystemName | String | No | The default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match. |
| SubsystemLabels | List | No | Select 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. |
| EnableServiceBusMetrics | Boolean | Yes | Create metrics from Azure ServiceBus statistics. |
| EnableUsageMetrics | Boolean | Yes | Create metrics from Azure Compute usage data. |
| EnableVirtualNetworksMetrics | Boolean | No | Create metrics from Azure Virtual networks data. |
| EnableSubscriptionLabel | Boolean | No | Add 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_namelabel.
| Name | Type | Required | Description |
|---|---|---|---|
| IntegrationName | String | Yes | Name identifying the integration. |
| TenantId | String | Yes | The tenant ID found in the Azure app registration. |
| ClientId | String | No | The client ID found in the Azure app registration. |
| AuthorizationEnabled | Boolean | No | True to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret. |
| ClientSecret | String | No | The client secret, if AuthorizationEnabled is false. |
| DiscoverSubscriptions | Boolean | Yes | Metrics will be collected for all visible subscriptions. |
| SubscriptionIds | List | No | List of Subscription IDs for which to collect metrics. Must be present if DiscoverSubscriptions is false. Not allowed if DiscoverSubscriptions is true. |
| ResourceNameFilter | String | No | Specify a RegEx to serve as a filter based on the name of the Azure resource being monitored. |
| ResourceTypes | List | No | Select 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. |
| MetricNamespaces | List | No | Specify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics. |
| ApplicationName | String | No | The default name of the application that the integration will be used with. This is used as a fallback when no labels match. |
| ApplicationLabels | List | No | Select 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. |
| SubsystemName | String | No | The default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match. |
| SubsystemLabels | List | No | Select 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. |
| EnableServiceBusMetrics | Boolean | Yes | Create metrics from Azure ServiceBus statistics. |
| EnableUsageMetrics | Boolean | Yes | Create metrics from Azure Compute usage data. |
| EnableVirtualNetworksMetrics | Boolean | No | Create metrics from Azure Virtual networks data. |
| EnableSubscriptionLabel | Boolean | No | Add 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:
- 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.
- 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.
| Name | Type | Required | Description |
|---|---|---|---|
| IntegrationName | String | Yes | Name identifying the integration. |
| TenantId | String | Yes | The tenant ID found in the Azure app registration. |
| ClientId | String | No | The client ID found in the Azure app registration. |
| AuthorizationEnabled | Boolean | No | True to use a multi-tenant app with admin consent. False to use an Azure App Registration with a client secret. |
| ClientSecret | String | No | The client secret, if AuthorizationEnabled is false. |
| SubscriptionId | String | Yes | Subscription ID for which to collect metrics. |
| ResourceNameFilter | String | No | Specify a RegEx to serve as a filter based on the name of the Azure resource being monitored. |
| ResourceTypes | List | No | Select 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. |
| MetricNamespaces | List | No | Specify the Azure Metric Namespaces of the metrics that you want to pull into Coralogix or leave empty to pull all the metrics. |
| ApplicationName | String | No | The default name of the application that the integration will be used with. This is used as a fallback when no labels match. |
| ApplicationLabels | List | No | Select 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. |
| SubsystemName | String | No | The default name of the subsystem that the integration will be used with. This is used as a fallback when no labels match. |
| SubsystemLabels | List | No | Select 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. |
| EnableServiceBusMetrics | Boolean | Yes | Create metrics from Azure ServiceBus statistics. |
| EnableUsageMetrics | Boolean | Yes | Create metrics from Azure Compute usage data. |
| EnableVirtualNetworksMetrics | Boolean | No | Create metrics from Azure Virtual networks data. |