Skip to content

Commit ca286c4

Browse files
committed
final touches
1 parent da049d9 commit ca286c4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/load-balancer/load-balancer-monitor-metrics-cli.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ The [az monitor metrics](cli/azure/monitor/metrics) command is used to view Azur
4949
```azurecli
5050
# Display available metric definitions for a Standard Load Balancer resource
5151
52-
az monitor metrics list-definitions --resource <ResourceName>
52+
az monitor metrics list-definitions --resource <resource_id>
5353
```
54-
55-
In the above example and the following examples, replace **<ResourceName>** with the value of your Standard Load Balancer resource in the format of */subscriptions/{subscriptionID}/resourceGroups/{resourceGroup}/Microsoft.Network/networkSecurityGroups/{resourceName}*.
54+
>[!NOTE]
55+
>In the all the following examples, replace **<resource_id>** with the unique resource id of your Standard Load Balancer.
5656
5757
To retrieve Standard Load Balancer metrics for a resource, you can use the `az monitor metrics list` command.
5858

@@ -62,12 +62,12 @@ For example, use the `--metric DipAvailability` option to collect the Health Pro
6262
6363
# List the Health Probe Status metric from a Standard Load Balancer
6464
65-
az monitor metrics list --resource <ResourceName> --metric DipAvailability
65+
az monitor metrics list --resource <resource_id> --metric DipAvailability
6666
```
6767

6868
When you run the above command, the output for Health Probe status will be like to the following output:
6969
```output
70-
user@Azure:~$ az monitor metrics list --resource <ResourceName> --metric DipAvailability
70+
user@Azure:~$ az monitor metrics list --resource <resource_id> --metric DipAvailability
7171
{
7272
"cost": 59,
7373
"interval": "0:01:00",
@@ -99,22 +99,22 @@ You can specify the aggregation type for a metric with the `–-aggregation` par
9999
100100
# List the average Health Probe Status metric from a Standard Load Balancer
101101
102-
az monitor metrics list --resource <ResourceName> --metric DipAvailability --aggregation Average
102+
az monitor metrics list --resource <resource_id> --metric DipAvailability --aggregation Average
103103
```
104104
To specify the interval to metrics, use the `--interval` parameter and specify a value in ##h##m format. The default interval is 1m.
105105

106106
```azurecli
107107
108108
# List the average List the average Health Probe Status metric from a Standard Load Balancer in 5 minute intervals
109109
110-
az monitor metrics list --resource <ResourceName> --metric DipAvailability --aggregation Average --interval 5m
110+
az monitor metrics list --resource <resource_id> --metric DipAvailability --aggregation Average --interval 5m
111111
```
112112
By default, az monitor metrics list returns the resource’s aggregate metrics from the last hour. You can query metric data over a period of time using `--start-time` and `--end-time` with the format of date (yyyy-mm-dd) time (hh:mm:ss.xxxxx) timezone (+/-hh:mm). To list the average Health Probe Status aggregated per day from May 5, 2022 and May 10, 2022, use the following command:
113113

114114
```azurecli
115115
# List average Health Probe Status metric aggregated per day from May 5, 2022 and May 10, 2022.
116116
117-
az monitor metrics list --resource <ResourceName> --metric DipAvailability --start-time 2022-05-01T00:00:00Z --end-time 2022-05-10T00:00:00Z --interval PT24H --aggregation Average
117+
az monitor metrics list --resource <resource_id> --metric DipAvailability --start-time 2022-05-01T00:00:00Z --end-time 2022-05-10T00:00:00Z --interval PT24H --aggregation Average
118118
```
119119
>[!Note]
120120
>Start and end times are represented using a format of yyyy-mm-dd format. For example, every day between May 5, 2022 and May 10, 2022 would be represented as `2022-05-01` and `2022-05-10`.
@@ -133,15 +133,15 @@ You can also specify a specific dimension value.
133133
```azurecli
134134
# List average Health Probe Status metric and filter for the 10.1.0.4 BackendIPAddress dimension
135135
136-
az monitor metrics list --resource <ResourceName> --metric DipAvailability --filter "BackendIPAddress eq '10.1.0.4'" --aggregation Average
136+
az monitor metrics list --resource <resource_id> --metric DipAvailability --filter "BackendIPAddress eq '10.1.0.4'" --aggregation Average
137137
```
138138

139139
In cases where you need to filter on multiple dimension values, specify the `--filter` value using `and` between the values.
140140

141141
```azurecli
142142
# List average Health Probe Status metric and filter for all BackendIPAddress and BackendPort dimensions
143143
144-
az monitor metrics list --resource <ResourceName> --metric DipAvailability --filter "BackendIPAddress eq '*' and BackendPort eq '*'" --aggregation Average
144+
az monitor metrics list --resource <resource_id> --metric DipAvailability --filter "BackendIPAddress eq '*' and BackendPort eq '*'" --aggregation Average
145145
```
146146

147147
## Next steps

0 commit comments

Comments
 (0)