Skip to content

Commit 8efc97f

Browse files
committed
chore: update doc
1 parent 5b612d8 commit 8efc97f

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed

deploy/example/metrics/README.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi
77
2. Get `EXTERNAL-IP` of service `csi-azurefile-controller`
88
```console
99
$ kubectl get svc csi-azurefile-controller -n kube-system
10-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
11-
csi-azurefile-controller ClusterIP 10.0.184.0 20.39.21.132 29614/TCP 47m
10+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
11+
csi-azurefile-controller LoadBalancer 10.0.184.0 20.39.21.132 29614:30563/TCP 47m
1212
```
1313

1414
3. Run following command to get cloudprovider_azure operation metrics
@@ -17,8 +17,58 @@ ip=`kubectl get svc csi-azurefile-controller -n kube-system | grep file | awk '{
1717
curl http://$ip:29614/metrics | grep cloudprovider_azure | grep file | grep -e sum -e count
1818
```
1919

20+
4. Run following command to get CSI-specific operation metrics
21+
```console
22+
ip=`kubectl get svc csi-azurefile-controller -n kube-system | grep file | awk '{print $4}'`
23+
curl http://$ip:29614/metrics | grep azurefile_csi_driver_operation | grep -e sum -e count
24+
```
25+
26+
27+
## CSI Driver Metrics
28+
29+
The Azure File CSI driver exposes the following custom metrics:
30+
31+
### Controller Metrics (port 29614)
32+
33+
| Metric | Type | Labels | Description |
34+
|--------|------|--------|-------------|
35+
| `azurefile_csi_driver_operation_duration_seconds` | Histogram | `operation`, `success` | Duration of CSI operations in seconds |
36+
| `azurefile_csi_driver_operation_duration_seconds_labeled` | Histogram | `operation`, `success`, `protocol`, `storage_account_type` | Duration of CSI operations with additional labels |
37+
| `azurefile_csi_driver_operations_total` | Counter | `operation`, `success` | Total number of CSI operations |
38+
39+
**Label Values:**
40+
- `operation`: `controller_create_volume`, `controller_delete_volume`, `controller_create_snapshot`, `controller_delete_snapshot`, `controller_expand_volume`
41+
- `success`: `true`, `false`
42+
- `protocol`: `SMB`, `NFS`
43+
- `storage_account_type`: `Premium_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardV2_LRS`, `Standard_GRS`, `Standard_ZRS`, etc.
44+
45+
### Node Metrics (port 29615)
46+
47+
| Metric | Type | Labels | Description |
48+
|--------|------|--------|-------------|
49+
| `azurefile_csi_driver_operation_duration_seconds` | Histogram | `operation`, `success` | Duration of CSI operations in seconds |
50+
| `azurefile_csi_driver_operations_total` | Counter | `operation`, `success` | Total number of CSI operations |
51+
52+
**Label Values:**
53+
- `operation`: `node_stage_volume`, `node_unstage_volume`, `node_publish_volume`, `node_unpublish_volume`
54+
- `success`: `true`, `false`
55+
56+
### Azure Cloud Provider Metrics
57+
58+
The CSI driver also exposes Azure cloud provider metrics from the underlying Azure SDK operations:
59+
60+
| Metric | Type | Labels | Description |
61+
|--------|------|--------|-------------|
62+
| `cloudprovider_azure_api_request_duration_seconds` | Histogram | `request`, `resource_group`, `subscription_id`, `source`, `result` | Latency of Azure API calls |
63+
| `cloudprovider_azure_api_request_throttled_count` | Counter | `request`, `resource_group`, `subscription_id`, `source` | Number of throttled Azure API requests |
64+
| `cloudprovider_azure_api_request_errors` | Counter | `request`, `resource_group`, `subscription_id`, `source` | Number of errors in Azure API requests |
65+
66+
These metrics help monitor Azure API performance, throttling, and error rates for file share operations.
67+
2068
## Get Prometheus metrics from CSI driver node pod
2169

2270
```console
23-
kubectl get --raw /api/v1/namespaces/kube-system/pods/csi-azurefile-node-hfgrn:29615/proxy/metrics
71+
kubectl get --raw /api/v1/namespaces/kube-system/pods/csi-azurefile-node-xxxxx:29615/proxy/metrics
2472
```
73+
74+
> **Note:** Replace `csi-azurefile-node-xxxxx` with an actual pod name from `kubectl get pods -n kube-system -l app=csi-azurefile-node`

0 commit comments

Comments
 (0)