@@ -40,28 +40,16 @@ Get-AzMetric -ResourceId "/subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/re
40
40
```
41
41
42
42
``` output
43
- DimensionName :
44
- DimensionValue :
45
- Name : AverageResponseTime
46
- EndTime : 3/20/2015 6:40:46 PM
47
- MetricValues : {Microsoft.Azure.Insights.Models.MetricValue, Microsoft.Azure.Insights.Models.MetricValue,
48
- Microsoft.Azure.Insights.Models.MetricValue, Microsoft.Azure.Insights.Models.MetricValue...}
49
- Properties : {}
50
- ResourceId : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3
51
- StartTime : 3/20/2015 5:40:00 PM
52
- TimeGrain : 00:01:00
53
- Unit : Seconds
54
- DimensionName :
55
- DimensionValue :
56
- Name : AverageMemoryWorkingSet
57
- EndTime : 3/20/2015 6:40:46 PM
58
- MetricValues : {Microsoft.Azure.Insights.Models.MetricValue, Microsoft.Azure.Insights.Models.MetricValue,
59
- Microsoft.Azure.Insights.Models.MetricValue, Microsoft.Azure.Insights.Models.MetricValue...}
60
- Properties : {}
61
- ResourceId : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3
62
- StartTime : 3/20/2015 5:40:00 PM
63
- TimeGrain : 00:01:00
64
- Unit : Bytes
43
+ Id : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3/providers/Microsoft.Insights/metrics/Requests
44
+ Name :
45
+ LocalizedValue : Requests
46
+ Value : Requests
47
+
48
+ Type : Microsoft.Insights/metrics
49
+ Unit : Count
50
+ Data : {Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue,
51
+ Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue…}
52
+ Timeseries : {Microsoft.Azure.Management.Monitor.Models.TimeSeriesElement}
65
53
```
66
54
67
55
This command gets the metric values for website3 with a time grain of 1 minute.
@@ -72,137 +60,56 @@ Get-AzMetric -ResourceId "/subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/re
72
60
```
73
61
74
62
``` output
75
- MetricValues :
76
- Average : 0
77
- Count : 1
78
- Last :
79
- Maximum :
80
- Minimum :
81
- Properties :
82
- Timestamp : 3/20/2015 6:37:00 PM
83
- Total : 0
84
- Average : 0.106
85
- Count : 1
86
- Last :
87
- Maximum :
88
- Minimum :
89
- Properties :
90
- Timestamp : 3/20/2015 6:39:00 PM
91
- Total : 0.106
92
- Average : 0.064
93
- Count : 1
94
- Last :
95
- Maximum :
96
- Minimum :
97
- Properties :
98
- Timestamp : 3/20/2015 6:41:00 PM
99
- Total : 0.064
100
- Properties :
101
- DimensionName :
102
- DimensionValue :
103
- Name : AverageResponseTime
104
- EndTime : 3/20/2015 6:43:33 PM
105
- ResourceId : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3
106
- StartTime : 3/20/2015 5:43:00 PM
107
- TimeGrain : 00:01:00
108
- Unit : Seconds
63
+ Id : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3/providers/Microsoft.Insights/metrics/Requests
64
+ Name : Microsoft.Azure.Management.Monitor.Models.LocalizableString
65
+
66
+ Type : Microsoft.Insights/metrics
67
+ Unit : Count
68
+ Data : {Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue,
69
+ Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue…}
70
+ Timeseries : {Microsoft.Azure.Management.Monitor.Models.TimeSeriesElement}
109
71
```
110
72
111
73
This command gets the metric values for website3 with a time grain of 1 minute.
112
74
The output is detailed.
113
75
114
- ### Example 3: Get detailed output for a specified metric
76
+ ### Example 3: Get a specified metric
115
77
``` powershell
116
- Get-AzMetric -ResourceId "/subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3" -MetricName "Requests" -TimeGrain 00:01:00 -DetailedOutput
78
+ Get-AzMetric -ResourceId "/subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3" -MetricName "Requests" -TimeGrain 00:01:00
117
79
```
118
80
119
81
``` output
120
- MetricValues :
121
- Average : 1
122
- Count : 1
123
- Last :
124
- Maximum :
125
- Minimum :
126
- Properties :
127
- Timestamp : 3/20/2015 6:39:00 PM
128
- Total : 1
129
- Average : 1
130
- Count : 1
131
- Last :
132
- Maximum :
133
- Minimum :
134
- Properties :
135
- Timestamp : 3/20/2015 6:41:00 PM
136
- Total : 1
137
- Average : 0
138
- Count : 1
139
- Last :
140
- Maximum :
141
- Minimum :
142
- Properties :
143
- Timestamp : 3/20/2015 6:43:00 PM
144
- Total : 0
145
- Average : 1
146
- Count : 1
147
- Last :
148
- Maximum :
149
- Minimum :
150
- Properties :
151
- Timestamp : 3/20/2015 6:44:00 PM
152
- Total : 1
153
- Average : 0
154
- Count : 1
155
- Last :
156
- Maximum :
157
- Minimum :
158
- Properties :
159
- Timestamp : 3/20/2015 6:45:00 PM
160
- Total : 0
161
- Properties :
162
- DimensionName :
163
- DimensionValue :
164
- Name : Requests
165
- EndTime : 3/20/2015 6:47:56 PM
166
- ResourceId : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3
167
- StartTime : 3/20/2015 5:47:00 PM
168
- TimeGrain : 00:01:00
169
- Unit : Count
82
+ Id : /subscriptions/e3f5b07d-3c39-4b0f-bf3b-40fdeba10f2a/resourceGroups/Default-Web-EastUS/providers/microsoft.web/sites/website3/providers/Microsoft.Insights/metrics/Requests
83
+ Name :
84
+ LocalizedValue : Requests
85
+ Value : Requests
86
+
87
+ Type : Microsoft.Insights/metrics
88
+ Unit : Count
89
+ Data : {Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue,
90
+ Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue, Microsoft.Azure.Commands.Insights.OutputClasses.PSMetricValue…}
91
+ Timeseries : {Microsoft.Azure.Management.Monitor.Models.TimeSeriesElement}
170
92
```
171
93
172
94
This command gets detailed output for the Requests metric.
173
95
174
96
### Example 4: Get summarized output for a specified metric with specified dimension filter
175
97
``` powershell
176
- $dimFilter = "$( New-AzMetricFilter -Dimension City -Operator eq -Value "Seattle","Toronto") and $(New-AzMetricFilter -Dimension AuthenticationType -Operator eq -Value User) "
98
+ $dimFilter = New-AzMetricFilter -Dimension availabilityResult/location -Operator eq -Value "Seattle","Toronto"
177
99
178
- Get-AzMetric -ResourceId <resourceId > -MetricName PageViews -TimeGrain 00:05:00 -MetricFilter $dimFilter -StartTime 2018-02-01T12 :00:00Z -EndTime 2018-02-01T12 :10:00Z -AggregationType Average
100
+ Get-AzMetric -ResourceId <ResourceId > -MetricName availabilityResults/availabilityPercentage -TimeGrain 00:05:00 -MetricFilter $dimFilter -StartTime 2024-07-02T00 :00:00Z -EndTime 2024-07-02T00 :10:00Z -AggregationType Average
179
101
```
180
102
181
103
``` output
182
- ResourceId : [ResourceId]
183
- MetricNamespace : Microsoft.Insights/ApplicationInsights
184
- Metric Name :
185
- LocalizedValue : Page Views
186
- Value : PageViews
187
- Unit : Seconds
188
- Timeseries :
189
- City : Seattle
190
- AuthenticationType : User
191
-
192
- Timestamp : 2018-02-01 12:00:00 PM
193
- Average : 3518
194
-
195
- Timestamp : 2018-02-01 12:05:00 PM
196
- Average : 1984
197
-
198
- City : Toronto
199
- AuthenticationType : User
200
-
201
- Timestamp : 2018-02-01 12:00:00 PM
202
- Average : 894
203
-
204
- Timestamp : 2018-02-01 12:05:00 PM
205
- Average : 967
104
+ Id : [ResourceId]/providers/Microsoft.Insights/metrics/availabilityResults/availabilityPercentage
105
+ Name :
106
+ LocalizedValue : Availability
107
+ Value : availabilityResults/availabilityPercentage
108
+
109
+ Type : Microsoft.Insights/metrics
110
+ Unit : Percent
111
+ Data :
112
+ Timeseries : {}
206
113
```
207
114
208
115
This command gets summarized output for the PageViews metric with specified dimension filter and aggregation type.
0 commit comments