You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/essentials/metrics-custom-overview.md
+18-10Lines changed: 18 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.reviewer: priyamishra
10
10
---
11
11
# Custom metrics in Azure Monitor (preview)
12
12
13
-
As you deploy resources and applications in Azure, you'll want to start collecting telemetry to gain insights into their performance and health. Azure makes some metrics available to you out of the box. These metrics are called [standard or platform](./metrics-supported.md). However, they're limited.
13
+
As you deploy resources and applications in Azure, start collecting telemetry to gain insights into their performance and health. Azure makes some metrics available to you out of the box. These metrics are called [standard or platform](./metrics-supported.md).
14
14
15
-
You might want to collect some custom performance indicators or business-specific metrics to provide deeper insights. These *custom* metrics can be collected via your application telemetry, an agent that runs on your Azure resources, or even an outside-in monitoring system. They can then be submitted directly to Azure Monitor. After custom metrics are published to Azure Monitor, you can browse, query, and alert on custom metrics for your Azure resources and applications side by side with the standard Azure metrics.
15
+
Collect custom performance indicators or business-specific metrics to provide deeper insights. These *custom* metrics can be collected via your application telemetry, an agent that runs on your Azure resources, or even an outside-in monitoring system. They can then be submitted directly to Azure Monitor. Once custom metrics are published to Azure Monitor, you can browse, query, and alert on them for your Azure resources and applications along side the standard Azure metrics.
16
16
17
17
Azure Monitor custom metrics are currently in public preview.
18
18
@@ -22,13 +22,13 @@ Custom metrics can be sent to Azure Monitor via several methods:
22
22
23
23
- Instrument your application by using the Azure Application Insights SDK and send custom telemetry to Azure Monitor.
24
24
- Install the Azure Monitor agent (preview) on your [Windows or Linux Azure VM](../agents/azure-monitor-agent-overview.md). Use a [data collection rule](../agents/data-collection-rule-azure-monitor-agent.md) to send performance counters to Azure Monitor metrics.
25
-
- Install the Azure Diagnostics extension on your [Azure VM](../essentials/collect-custom-metrics-guestos-resource-manager-vm.md), [virtual machine scale set](../essentials/collect-custom-metrics-guestos-resource-manager-vmss.md), [classic VM](../essentials/collect-custom-metrics-guestos-vm-classic.md), or [classic cloud service](../essentials/collect-custom-metrics-guestos-vm-cloud-service-classic.md). Then send performance counters to Azure Monitor.
25
+
- Install the Azure Diagnostics extension on your [Azure VM](../essentials/collect-custom-metrics-guestos-resource-manager-vm.md), [Virtual Machine Scale Set](../essentials/collect-custom-metrics-guestos-resource-manager-vmss.md), [classic VM](../essentials/collect-custom-metrics-guestos-vm-classic.md), or [classic cloud service](../essentials/collect-custom-metrics-guestos-vm-cloud-service-classic.md). Then send performance counters to Azure Monitor.
26
26
- Install the [InfluxData Telegraf agent](../essentials/collect-custom-metrics-linux-telegraf.md) on your Azure Linux VM. Send metrics by using the Azure Monitor output plug-in.
27
27
- Send custom metrics [directly to the Azure Monitor REST API](./metrics-store-custom-rest-api.md), `https://<azureregion>.monitoring.azure.com/<AzureResourceID>/metrics`.
28
28
29
29
## Pricing model and retention
30
30
31
-
For details on when billing will be enabled for custom metrics and metrics queries, check the [Azure Monitor pricing page](https://azure.microsoft.com/pricing/details/monitor/). In summary, there's no cost to ingest standard metrics (platform metrics) into an Azure Monitor metrics store, but custom metrics will incur costs when they enter general availability. Queries to the metrics API do incur costs.
31
+
For details on when billing is enabled for custom metrics and metrics queries, check the [Azure Monitor pricing page](https://azure.microsoft.com/pricing/details/monitor/). In summary, there's no cost to ingest standard metrics (platform metrics) into an Azure Monitor metrics store, but custom metrics incur costs when they enter general availability. Queries to the metrics API do incur costs.
32
32
33
33
Custom metrics are retained for the [same amount of time as platform metrics](../essentials/data-platform-metrics.md#retention-of-metrics).
34
34
@@ -53,7 +53,7 @@ To submit custom metrics to Azure Monitor, the entity that submits the metric ne
53
53
54
54
### Subject
55
55
56
-
The subject property captures which Azure resource ID the custom metric is reported for. This information will be encoded in the URL of the API call. Each API can submit metric values for only a single Azure resource.
56
+
The subject property captures which Azure resource ID the custom metric is reported for. This information is encoded in the URL of the API call. Each API can submit metric values for only a single Azure resource.
57
57
58
58
> [!NOTE]
59
59
> You can't emit custom metrics against the resource ID of a resource group or subscription.
@@ -101,7 +101,7 @@ Although dimensions are optional, if a metric post defines dimension keys, corre
101
101
102
102
Azure Monitor stores all metrics at 1-minute granularity intervals. During a given minute, a metric might need to be sampled several times. An example is CPU utilization. Or a metric might need to be measured for many discrete events, such as sign-in transaction latencies.
103
103
104
-
To limit the number of raw values that you have to emit and pay for in Azure Monitor, you can locally pre-aggregate and emit the values:
104
+
To limit the number of raw values that you have to emit and pay for in Azure Monitor, locally pre-aggregate and emit the aggregated values:
105
105
106
106
***Min**: The minimum observed value from all the samples and measurements during the minute.
107
107
***Max**: The maximum observed value from all the samples and measurements during the minute.
@@ -176,10 +176,10 @@ In the following example, you create a custom metric called **Memory Bytes in Us
176
176
177
177
## Custom metric definitions
178
178
179
-
There's no need to predefine a custom metric in Azure Monitor before it's emitted. Each metric data point published contains namespace, name, and dimension information. So, the first time a custom metric is emitted to Azure Monitor, a metric definition is automatically created. This metric definition is then discoverable on any resource that the metric is emitted against via the metric definitions.
179
+
Each metric data point published contains a namespace, name, and dimension information. The first time a custom metric is emitted to Azure Monitor, a metric definition is automatically created. This new metric definition is then discoverable on any resource that the metric is emitted from via the metric definitions. There's no need to predefine a custom metric in Azure Monitor before it's emitted.
180
180
181
181
> [!NOTE]
182
-
> Azure Monitor doesn't yet support defining **Units** for a custom metric.
182
+
> Azure Monitor doesn't support defining **Units** for a custom metric.
183
183
184
184
## Using custom metrics
185
185
@@ -221,9 +221,10 @@ Azure Monitor imposes the following usage limits on custom metrics:
221
221
222
222
|Category|Limit|
223
223
|---|---|
224
-
|Total active time series in a subscription across all regions you've deployed to|50,000|
224
+
|Total active time series in a subscription per region|50,000|
225
225
|Dimension keys per metric|10|
226
226
|String length for metric namespaces, metric names, dimension keys, and dimension values|256 characters|
227
+
|The combined length of all custom metric names, using utf-8 encoding|64 KB|
227
228
228
229
An active time series is defined as any unique combination of metric, dimension key, or dimension value that has had metric values published in the past 12 hours.
229
230
@@ -246,6 +247,13 @@ Follow the steps below to see your current total active time series metrics, and
246
247
1. Select the **Apply** button.
247
248
1. Choose either **Active Time Series**, **Active Time Series Limit**, or **Throttled Time Series**.
248
249
250
+
There is a limit of 64 KB on the combined length of all custom metrics names, assuming utf-8 or 1 byte per character. If the 64-KB limit is exceeded, metadata for additional metrics won't be available. The metric names for additional custom metrics won't appear in the Azure portal in selection fields, and won't be returned by the API in requests for metric definitions. The metric data is still available and can be queried.
251
+
252
+
When the limit has been exceeded, reduce the number of metrics you're sending or shorten the length of their names. It then takes up to two days for the new metrics' names to appear.
253
+
254
+
To avoid reaching the limit, don't include variable or dimensional aspects in your metric names.
255
+
For example, the metrics for server CPU usage,`CPU_server_12345678-319d-4a50-b27e-1234567890ab` and `CPU_server_abcdef01-319d-4a50-b27e-abcdef012345` should be defined as metric `CPU` and with a `Server` dimension.
256
+
249
257
## Design limitations and considerations
250
258
251
259
**Using Application Insights for the purpose of auditing.** The Application Insights telemetry pipeline is optimized for minimizing the performance impact and limiting the network traffic from monitoring your application. As such, it throttles or samples (takes only a percentage of your telemetry and ignores the rest) if the initial dataset becomes too large. Because of this behavior, you can't use it for auditing purposes because some records are likely to be dropped.
@@ -272,7 +280,7 @@ But if high cardinality is essential for your scenario, the aggregated metrics a
0 commit comments