Skip to content

Commit 08e096a

Browse files
authored
Merge pull request #292560 from khdownie/kendownie-prometheus
ACStor Prometheus monitoring
2 parents c6571ff + 821a921 commit 08e096a

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

articles/storage/container-storage/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
href: clone-volume.md
3838
- name: Enable multi-zone storage redundancy
3939
href: enable-multi-zone-redundancy.md
40+
- name: Enable monitoring with managed Prometheus
41+
href: enable-monitoring.md
4042
- name: Remove Azure Container Storage
4143
href: remove-container-storage.md
4244
- name: Troubleshoot Azure Container Storage
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
title: Enable monitoring for Azure Container Storage
3+
description: Enable monitoring for stateful workloads running on Azure Container Storage using Azure Monitor managed service for Prometheus.
4+
author: khdownie
5+
ms.service: azure-container-storage
6+
ms.topic: how-to
7+
ms.date: 01/06/2025
8+
ms.author: kendownie
9+
---
10+
11+
# Enable monitoring for Azure Container Storage with managed Prometheus (preview)
12+
13+
You can now monitor your stateful workloads running on Azure Container Storage service using managed Prometheus. Prometheus is a popular open-source monitoring and alerting solution that's widely used in Kubernetes environments to monitor and alert on infrastructure and workload performance.
14+
15+
[Azure Monitor managed service for Prometheus](/azure/azure-monitor/essentials/prometheus-metrics-overview#azure-monitor-managed-service-for-prometheus) is a component of [Azure Monitor Metrics](/azure/azure-monitor/essentials/data-platform-metrics) that provides a fully managed and scalable environment for running Prometheus. It enables collecting Prometheus metrics from your Azure Kubernetes Service (AKS) clusters to monitor your workloads.
16+
17+
Prometheus metrics are stored in an Azure Monitor workspace, where you can analyze and visualize the data using [Azure Monitor Metrics Explorer with PromQL (preview)](/azure/azure-monitor/essentials/metrics-explorer) and [Azure Managed Grafana](/azure/managed-grafana/overview).
18+
19+
## Prerequisites and limitations
20+
21+
This preview feature only supports Azure Monitor managed service for Prometheus. If you have your own Prometheus instance deployed, then you must disable Azure Container Storage's Prometheus instance by running the following Azure CLI command. Replace `<cluster_name>` and `<resource_group_name>` with your own values.
22+
23+
```azurecli
24+
az k8s-extension update --cluster-type managedClusters --cluster-name <cluster_name> --resource-group <resource_group_name> --name azurecontainerstorage --config base.metrics.enablePrometheusStack=false
25+
```
26+
27+
Azure Managed Grafana default dashboard support isn't currently enabled for Azure Container Storage.
28+
29+
## Collect Azure Container Storage Prometheus metrics
30+
31+
You can use Azure Monitor managed service for Prometheus to collect Azure Container Storage metrics along with other Prometheus metrics from your AKS cluster. To start collecting Azure Container Storage metrics, [enable Managed Prometheus on the AKS cluster](/azure/azure-monitor/containers/kubernetes-monitoring-enable?tabs=cli#enable-prometheus-and-grafana). If your AKS cluster already has Prometheus enabled, then installing Azure Container Storage on that cluster will automatically start collecting Azure Container Storage metrics.
32+
33+
### Scrape frequency
34+
35+
The default scrape frequency for all default targets and scrapes is 30 seconds.
36+
37+
### Metrics collected for default targets
38+
39+
The following Azure Container Storage targets are enabled by default, which means you don't have to provide any scrape job configuration for these targets:
40+
41+
- `acstor-capacity-provisioner` (storage pool metrics)
42+
- `acstor-metrics-exporter` (disk metrics)
43+
44+
You can customize data collection for the default targets using the Managed Prometheus ConfigMap. See [Customize scraping of Prometheus metrics in Azure Monitor](/azure/azure-monitor/containers/prometheus-metrics-scrape-configuration).
45+
46+
#### Storage pool metrics
47+
48+
Azure Container Storage provides the following storage pool metrics collected from the `acstor-capacity-provisioner` target (job=acstor-capacity-provisioner):
49+
50+
| **Metric** | **Description** |
51+
|------------------|-----------------|
52+
| `storage_pool_ready_state` | This is a gauge metric to detect storage pool state (0 = not ready, 1 = ready). |
53+
| `storage_pool_capacity_provisioned_bytes` | Storage pool capacity provisioned in bytes. |
54+
| `storage_pool_capacity_used_bytes` | Storage pool capacity used in bytes from the provisioned storage pool capacity. |
55+
| `storage_pool_snapshot_capacity_reserved_bytes` | Storage pool capacity reserved in bytes for storing local snapshots. |
56+
57+
#### Disk metrics
58+
59+
Azure Container Storage provides the following disk metrics collected from the `acstor-metrics-exporter` target (job=acstor-metrics-exporter):
60+
61+
| **Metric** | **Description** |
62+
|------------------|-----------------|
63+
| `disk_pool_ready_state` | This is a gauge metric to detect disk pool state (0 = not ready, 1 = ready). |
64+
| `disk_read_operations_completed_total` | The number of total disk read operations performed successfully over the disk. |
65+
| `disk_write_operations_completed_total` | The number of total disk write operations performed successfully over the disk. |
66+
| `disk_read_operations_time_seconds_total` | The total time spent performing read operations in seconds. |
67+
| `disk_write_operations_time_seconds_total` | The total time spent performing write operations in seconds. |
68+
| `disk_errors_total` | Count of disk errors. |
69+
| `disk_read_bytes_total` | The total number of bytes read successfully. |
70+
| `disk_written_bytes_total` | The total number of bytes written successfully. |
71+
| `disk_readonly_errors_gauge` | This is a gauge metric to measure read-only volume mounts. |
72+
73+
## Query Azure Container Storage metrics
74+
75+
Azure Container Storage metrics are stored in the Azure Monitor workspace that's associated with managed Prometheus. You can query metrics directly from the workspace or through the Azure Managed Grafana instance that's connected to the workspace.
76+
77+
To view Azure Container Storage metrics, follow these steps:
78+
79+
1. Sign in to the [Azure portal](https://portal.azure.com?azure-portal=true) and navigate to your AKS cluster.
80+
81+
1. From the service menu, under **Monitoring**, select **Insights**, and then select **Monitor Settings**.
82+
83+
:::image type="content" source="media/enable-monitoring/monitor-settings.png" alt-text="Screenshot showing how to find Monitor Settings in the Azure portal." lightbox="media/enable-monitoring/monitor-settings.png":::
84+
85+
1. Under **Managed Prometheus**, select the appropriate Azure Monitor workspace instance. On the instance overview page, select the **Metrics** section, and query the desired metrics.
86+
87+
:::image type="content" source="media/enable-monitoring/metrics.png" alt-text="Screenshot showing how to query Azure Container Storage metrics using the Azure portal." lightbox="media/enable-monitoring/metrics.png":::
88+
89+
1. Alternatively, you can select the Managed Grafana instance, and on the instance overview page, click on the endpoint URL. This will navigate to the Grafana portal where you can query the metrics. The data source will be automatically configured for you to query metrics from the associated Azure Monitor workspace.
90+
91+
:::image type="content" source="media/enable-monitoring/dashboard.png" alt-text="Screenshot of an Azure Managed Prometheus dashboard and metrics browser." lightbox="media/enable-monitoring/dashboard.png":::
92+
93+
To learn more about querying Prometheus metrics from Azure Monitor workspace, see [Use Azure Monitor managed service for Prometheus as data source for Grafana](/azure/azure-monitor/essentials/prometheus-grafana).
94+
95+
## Next steps
96+
97+
- [Create a dashboard in Azure Managed Grafana](/azure/managed-grafana/how-to-create-dashboard?tabs=azure-portal)
98+
- [Create alerts on Azure Container Store metrics using Prometheus Rule Groups](/azure/azure-monitor/essentials/prometheus-rule-groups)
132 KB
Loading
76 KB
Loading
230 KB
Loading

0 commit comments

Comments
 (0)