你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Metrics Batch - Batch
Lists多个资源的指标值。
POST {endpoint}/subscriptions/{subscriptionId}/metrics:getBatch?metricnamespace={metricnamespace}&metricnames={metricnames}&api-version=2023-10-01
POST {endpoint}/subscriptions/{subscriptionId}/metrics:getBatch?starttime={starttime}&endtime={endtime}&interval={interval}&metricnamespace={metricnamespace}&metricnames={metricnames}&aggregation={aggregation}&top={top}&orderby={orderby}&filter={filter}&rollupby={rollupby}&api-version=2023-10-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
endpoint
|
path | True |
string url |
要使用的区域终结点,例如 https://eastus.metrics.monitor.azure.com。 该区域应与所请求资源的区域匹配。 对于全局资源,区域应为“全局”。 |
subscription
|
path | True |
string uuid |
此批处理中资源的订阅标识符。 |
api-version
|
query | True |
string |
客户端 API 版本。 |
metricnames
|
query | True |
string[] |
要检索的指标名称 (逗号分隔) 。 |
metricnamespace
|
query | True |
string |
包含请求的指标名称的指标命名空间。 |
aggregation
|
query |
string |
聚合类型列表 (逗号分隔) 进行检索。 示例:平均值、最小值、最大值 |
|
endtime
|
query |
string |
查询的结束时间。 它是格式为“yyyy-MM-ddTHH:mm:ss.fffZ”的字符串。 |
|
filter
|
query |
string |
筛选器用于减少返回的指标数据集。 |
|
interval
|
query |
string |
间隔 (即 ISO 8601 持续时间格式的查询的 timegrain) 。 默认为 PT1M。 针对请求的整个时间跨度返回单个数据点的“FULL”值的特殊情况。 示例:PT15M、PT1H、P1D、FULL |
|
orderby
|
query |
string |
用于对结果和排序方向进行排序的聚合。 只能指定一个订单。 示例:sum asc |
|
rollupby
|
query |
string |
维度名称 (汇总结果所依据的) 。 例如,如果只想查看带有筛选器(如“西雅图城市或城市 eq Tacoma”)的指标值,但不想查看每个城市的单独值,则可以指定“RollUpBy=City”来查看西雅图和 Tacoma 的结果汇总到一个时序。 |
|
starttime
|
query |
string |
查询的开始时间。 它是格式为“yyyy-MM-ddTHH:mm:ss.fffZ”的字符串。 如果指定了 endtime 参数,则此参数是必需的。 如果仅指定 starttime,则 endtime 默认为当前时间。 如果未指定时间间隔,则默认值为 1 小时。 |
|
top
|
query |
integer int32 |
请求中每个资源 ID 要检索的最大记录数。 仅当指定了筛选器时有效。 默认值为 10。 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
resourceids |
string[] |
要查询其指标的资源 ID 列表。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
对指标查询的响应。 |
|
Other Status Codes |
描述错误响应的格式。 标头 x-ms-error-code: string |
安全性
AADToken
Azure Active Directory OAuth2 身份验证
类型:
oauth2
流向:
application
令牌 URL:
https://login.microsoftonline.com/common/oauth2/v2.0/token
作用域
名称 | 说明 |
---|---|
https://metrics.monitor.azure.com/.default | https://metrics.monitor.azure.com/.default |
示例
Query Redis Metrics summary |
Query Storage Metrics |
Query Redis Metrics summary
示例请求
POST {endpoint}/subscriptions/12345678-abcd-1234-abcd-123456789abc/metrics:getBatch?starttime=2023-11-07T14:00:00.000Z&endtime=2023-11-07T18:00:00.000Z&interval=FULL&metricnamespace=Microsoft.Cache/Redis&metricnames=cacheWrite&aggregation=average&top=10&orderby=average desc&filter=ShardId eq '0'&rollupby=ShardId&api-version=2023-10-01
{
"resourceids": [
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2"
]
}
示例响应
{
"values": [
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 35513.760416666664
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis5"
},
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 7135.0625
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis3"
},
{
"starttime": "2023-11-07T14:00:00Z",
"endtime": "2023-11-07T18:00:00Z",
"interval": "PT4H",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2/providers/Microsoft.Insights/metrics/cacheWrite",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "cacheWrite",
"localizedValue": "Cache Write"
},
"displayDescription": "The amount of data written to the cache in bytes per second. For more details, see https://aka.ms/redis/metrics.",
"unit": "BytesPerSecond",
"timeseries": [
{
"metadatavalues": [],
"data": [
{
"timeStamp": "2023-11-07T14:00:00Z",
"average": 6723.489583333333
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.cache/redis",
"resourceregion": "westus2",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/test_redis/providers/Microsoft.Cache/Redis/redis2"
}
]
}
x-ms-error-code: BadRequest
{
"error": {
"additionalInfo": [
{
"type": "string",
"info": "TraceId=dd033ebf1e260d815f4bccad149bbc15"
},
{
"type": "string",
"info": "ExceptionType=Microsoft.Online.Metrics.MetricsMP.Utilities.RPRequestFormatException"
}
],
"code": "BadRequest",
"message": "Detected invalid time range parameters for API version 2023-10-01. Please use only starttime and endtime to specify a time range."
}
}
Query Storage Metrics
示例请求
POST {endpoint}/subscriptions/12345678-abcd-1234-abcd-123456789abc/metrics:getBatch?starttime=2023-02-01T20:00:00.123Z&endtime=2023-02-01T23:00:00.345Z&interval=PT15M&metricnamespace=Microsoft.Storage/storageAccounts&metricnames=Ingress,Egress&aggregation=average,minimum,maximum&top=10&orderby=average desc&filter=ApiName eq 'GetBlob' or ApiName eq 'GetBlobServiceProperties' and Authentication eq '*'&api-version=2023-10-01
{
"resourceids": [
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1",
"/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2"
]
}
示例响应
{
"values": [
{
"starttime": "2023-02-01T20:00:00.123Z",
"endtime": "2023-02-01T23:00:00.345Z",
"interval": "PT15M",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1/providers/Microsoft.Insights/metrics/Ingress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Ingress",
"localizedValue": "Ingress"
},
"displayDescription": "The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlob"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "SAS"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T20:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T20:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T20:45:00Z",
"average": 437.54477611940297,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T21:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T21:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T21:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T21:45:00Z",
"average": 437.54477611940297,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T22:15:00Z",
"average": 438.0735294117647,
"minimum": 437,
"maximum": 583
},
{
"timeStamp": "2023-02-01T22:30:00Z",
"average": 437,
"minimum": 437,
"maximum": 437
},
{
"timeStamp": "2023-02-01T22:45:00Z",
"average": 437.542750929368,
"minimum": 437,
"maximum": 583
}
]
},
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 342,
"minimum": 342,
"maximum": 342
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
},
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1/providers/Microsoft.Insights/metrics/Egress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Egress",
"localizedValue": "Egress"
},
"displayDescription": "The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 796,
"minimum": 796,
"maximum": 796
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
},
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlob"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "SAS"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T20:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T20:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T20:45:00Z",
"average": 363.4514925373134,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T21:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T21:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T21:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T21:45:00Z",
"average": 363.4514925373134,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T22:15:00Z",
"average": 365.83088235294116,
"minimum": 361,
"maximum": 1018
},
{
"timeStamp": "2023-02-01T22:30:00Z",
"average": 361,
"minimum": 361,
"maximum": 361
},
{
"timeStamp": "2023-02-01T22:45:00Z",
"average": 363.4423791821561,
"minimum": 361,
"maximum": 1018
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.storage/storageaccounts",
"resourceregion": "eastus",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage1"
},
{
"starttime": "2023-02-01T20:00:00.123Z",
"endtime": "2023-02-01T23:00:00.345Z",
"interval": "PT15M",
"value": [
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2/providers/Microsoft.Insights/metrics/Ingress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Ingress",
"localizedValue": "Ingress"
},
"displayDescription": "The amount of ingress data, in bytes. This number includes ingress from an external client into Azure Storage as well as ingress within Azure.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 330,
"minimum": 330,
"maximum": 330
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
},
{
"id": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2/providers/Microsoft.Insights/metrics/Egress",
"type": "Microsoft.Insights/metrics",
"name": {
"value": "Egress",
"localizedValue": "Egress"
},
"displayDescription": "The amount of egress data. This number includes egress to external client from Azure Storage as well as egress within Azure. As a result, this number does not reflect billable egress.",
"unit": "Bytes",
"timeseries": [
{
"metadatavalues": [
{
"name": {
"value": "apiname",
"localizedValue": "apiname"
},
"value": "GetBlobServiceProperties"
},
{
"name": {
"value": "authentication",
"localizedValue": "authentication"
},
"value": "AccountKey"
}
],
"data": [
{
"timeStamp": "2023-02-01T20:00:00Z"
},
{
"timeStamp": "2023-02-01T20:15:00Z"
},
{
"timeStamp": "2023-02-01T20:30:00Z"
},
{
"timeStamp": "2023-02-01T20:45:00Z"
},
{
"timeStamp": "2023-02-01T21:00:00Z"
},
{
"timeStamp": "2023-02-01T21:15:00Z"
},
{
"timeStamp": "2023-02-01T21:30:00Z"
},
{
"timeStamp": "2023-02-01T21:45:00Z"
},
{
"timeStamp": "2023-02-01T22:00:00Z",
"average": 880,
"minimum": 880,
"maximum": 880
},
{
"timeStamp": "2023-02-01T22:15:00Z"
},
{
"timeStamp": "2023-02-01T22:30:00Z"
},
{
"timeStamp": "2023-02-01T22:45:00Z"
}
]
}
],
"errorCode": "Success"
}
],
"namespace": "microsoft.storage/storageaccounts",
"resourceregion": "eastus",
"resourceid": "/subscriptions/12345678-abcd-1234-abcd-123456789abc/resourceGroups/TestGroup/providers/Microsoft.Storage/storageAccounts/TestStorage2"
}
]
}
x-ms-error-code: BadRequest
{
"error": {
"additionalInfo": [
{
"type": "string",
"info": "TraceId={00000000-0000-0000-0000-000000000000}"
},
{
"type": "string",
"info": "ExceptionType=Microsoft.Online.Metrics.MetricsMP.Utilities.RPRequestFormatException"
}
],
"code": "BadRequest",
"message": "Query endTime: 06/06/2021 00:00:00 is out of the Max metrics retention period: 93.00:00:00, traceId: {00000000-0000-0000-0000-000000000000}"
}
}
定义
名称 | 说明 |
---|---|
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Localizable |
可本地化的字符串类。 |
Metadata |
表示指标元数据值。 |
Metric |
查询的结果数据。 |
Metric |
资源的指标结果。 |
Metric |
指标的单位。 |
Metric |
表示指标值。 |
Resource |
要查询其指标的资源 ID 的逗号分隔列表。 |
Time |
时序结果类型。 在这种情况下,鉴别器值始终为 TimeSeries。 |
Values |
每个资源(每个指标)的指标数据响应集合。 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
LocalizableString
可本地化的字符串类。
名称 | 类型 | 说明 |
---|---|---|
localizedValue |
string |
显示名称。 |
value |
string |
固定值。 |
MetadataValue
表示指标元数据值。
名称 | 类型 | 说明 |
---|---|---|
name |
元数据的名称。 |
|
value |
string |
元数据的值。 |
Metric
查询的结果数据。
名称 | 类型 | 说明 |
---|---|---|
displayDescription |
string |
此指标的详细说明。 |
errorCode |
string |
“成功”或有关此指标的查询失败的错误详细信息。 |
errorMessage |
string |
查询此特定指标时遇到错误消息。 |
id |
string |
指标 ID。 |
name |
指标的名称和显示名称,即它是可本地化的字符串。 |
|
timeseries |
执行数据查询时返回的时序。 |
|
type |
string |
指标资源的资源类型。 |
unit |
指标的单位。 |
MetricResultsResponse
资源的指标结果。
名称 | 类型 | 说明 |
---|---|---|
values |
Values[] |
每个资源(每个指标)的指标数据响应集合。 |
MetricUnit
指标的单位。
名称 | 类型 | 说明 |
---|---|---|
BitsPerSecond |
string |
每秒二进制数字的速率单位。 |
ByteSeconds |
string |
数据传输或存储单位。 它是数据的大小(以字节为单位)乘以传输或存储数据所需的时间(以秒为单位)。 |
Bytes |
string |
内存单位(以字节为单位)。 |
BytesPerSecond |
string |
内存单位的速率(以字节/秒为单位)。 |
Cores |
string |
处理能力单位。 |
Count |
string |
原始数量单位。 |
CountPerSecond |
string |
每秒原始数量的速率单位。 |
MilliCores |
string |
CPU 内核的 1/1000 的处理能力单位。 |
MilliSeconds |
string |
以 1/1000 秒为单位的时间单位。 |
NanoCores |
string |
CPU 内核的十亿分之一的处理能力单位。 |
Percent |
string |
百分比单位。 |
Seconds |
string |
时间单位(以秒为单位)。 |
Unspecified |
string |
未指定单位。 |
MetricValue
表示指标值。
名称 | 类型 | 说明 |
---|---|---|
average |
number |
时间范围内的平均值。 |
count |
number |
时间范围内的样本数。 可用于确定与平均值有关的值数。 |
maximum |
number |
时间范围内的最大值。 |
minimum |
number |
时间范围内的最小值。 |
timeStamp |
string |
ISO 8601 格式的指标值的时间戳。 |
total |
number |
时间范围内所有值的总和。 |
ResourceIdList
要查询其指标的资源 ID 的逗号分隔列表。
名称 | 类型 | 说明 |
---|---|---|
resourceids |
string[] |
要查询其指标的资源 ID 列表。 |
TimeSeriesElement
时序结果类型。 在这种情况下,鉴别器值始终为 TimeSeries。
名称 | 类型 | 说明 |
---|---|---|
data |
表示指标值的数据点数组。 仅当指定了数据的结果类型时,才会返回此值。 |
|
metadatavalues |
如果在调用中指定了$filter,则返回的元数据值。 |
Values
每个资源(每个指标)的指标数据响应集合。
名称 | 类型 | 说明 |
---|---|---|
endtime |
string |
检索数据的结束时间(日期/时间格式)。 |
interval |
string |
间隔 (窗口大小) ,其中指标数据以 ISO 8601 持续时间格式返回,“FULL”值的特殊情况,该值返回请求的整个时间跨度的单一数据点 (示例:PT15M、PT1H、P1D、FULL) 。 如果指定了 AutoAdjustTimegrain=true,这可能会进行调整,并且不同于最初请求的内容。 |
namespace |
string |
已查询指标的命名空间 |
resourceid |
string |
已查询指标的资源。 |
resourceregion |
string |
资源的区域已查询指标。 |
starttime |
string |
检索数据的日期/时间格式的开始时间。 |
value |
Metric[] |
集合的值。 |