diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/metrics_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/metrics_API.json index d6bd126f6e6f..ea858a43f2f5 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/metrics_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-05-01-preview/metrics_API.json @@ -319,6 +319,10 @@ "type": "string", "description": "'Success' or the error details on query failures for this metric." }, + "errorMessage": { + "type": "string", + "description": "Error message encountered querying this specific metric." + }, "unit": { "$ref": "#/definitions/Unit", "description": "the unit of the metric." @@ -335,7 +339,6 @@ "id", "type", "name", - "displayDescription", "unit", "timeseries" ], diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json index 6b07e32cb0c9..d94389a3b730 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitions.json @@ -970,6 +970,12 @@ } ] } + }, + "default": { + "body": { + "code": "BadRequest", + "message": "ApiVersion: 2018-01-01 does not support query metricdefinitions at non Arm resource Id level" + } } } } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json new file mode 100644 index 000000000000..c64227d9be0b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricDefinitionsMetricClass.json @@ -0,0 +1,1306 @@ +{ + "parameters": { + "resourceUri": "subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "api-version": "2018-01-01", + "metricnamespace": "microsoft.storagecache/caches" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientIOPS", + "localizedValue": "Total Client IOPS" + }, + "displayDescription": "The rate of client file operations processed by the Cache.", + "isDimensionRequired": false, + "unit": "Count", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLatency", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Latency", + "name": { + "value": "ClientLatency", + "localizedValue": "Average Client Latency" + }, + "displayDescription": "Average latency of client file operations to the Cache.", + "isDimensionRequired": false, + "unit": "MilliSeconds", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientReadIOPS", + "localizedValue": "Client Read IOPS" + }, + "displayDescription": "Client read operations per second.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientReadThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientReadThroughput", + "localizedValue": "Average Cache Read Throughput" + }, + "displayDescription": "Client read data transfer rate.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientWriteIOPS", + "localizedValue": "Client Write IOPS" + }, + "displayDescription": "Client write operations per second.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientWriteThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientWriteThroughput", + "localizedValue": "Average Cache Write Throughput" + }, + "displayDescription": "Client write data transfer rate.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataReadIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientMetadataReadIOPS", + "localizedValue": "Client Metadata Read IOPS" + }, + "displayDescription": "The rate of client file operations sent to the Cache, excluding data reads, that do not modify persistent state.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientMetadataWriteIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientMetadataWriteIOPS", + "localizedValue": "Client Metadata Write IOPS" + }, + "displayDescription": "The rate of client file operations sent to the Cache, excluding data writes, that modify persistent state.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/ClientLockIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "ClientLockIOPS", + "localizedValue": "Client Lock IOPS" + }, + "displayDescription": "Client file locking operations per second.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetHealth", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Errors", + "name": { + "value": "StorageTargetHealth", + "localizedValue": "Storage Target Health" + }, + "displayDescription": "Boolean results of connectivity test between the Cache and Storage Targets.", + "isDimensionRequired": false, + "unit": "Count", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/Uptime", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Availability", + "name": { + "value": "Uptime", + "localizedValue": "Uptime" + }, + "displayDescription": "Boolean results of connectivity test between the Cache and monitoring system.", + "isDimensionRequired": false, + "unit": "Count", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetIOPS", + "localizedValue": "Total StorageTarget IOPS" + }, + "displayDescription": "The rate of all file operations the Cache sends to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "Count", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetWriteIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetWriteIOPS", + "localizedValue": "StorageTarget Write IOPS" + }, + "displayDescription": "The rate of the file write operations the Cache sends to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "Count", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetAsyncWriteThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetAsyncWriteThroughput", + "localizedValue": "StorageTarget Asynchronous Write Throughput" + }, + "displayDescription": "The rate the Cache asynchronously writes data to a particular StorageTarget. These are opportunistic writes that do not cause clients to block.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetSyncWriteThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetSyncWriteThroughput", + "localizedValue": "StorageTarget Synchronous Write Throughput" + }, + "displayDescription": "The rate the Cache synchronously writes data to a particular StorageTarget. These are writes that do cause clients to block.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalWriteThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetTotalWriteThroughput", + "localizedValue": "StorageTarget Total Write Throughput" + }, + "displayDescription": "The total rate that the Cache writes data to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetLatency", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetLatency", + "localizedValue": "StorageTarget Latency" + }, + "displayDescription": "The average round trip latency of all the file operations the Cache sends to a partricular StorageTarget.", + "isDimensionRequired": false, + "unit": "MilliSeconds", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataReadIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetMetadataReadIOPS", + "localizedValue": "StorageTarget Metadata Read IOPS" + }, + "displayDescription": "The rate of file operations that do not modify persistent state, and excluding the read operation, that the Cache sends to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetMetadataWriteIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetMetadataWriteIOPS", + "localizedValue": "StorageTarget Metadata Write IOPS" + }, + "displayDescription": "The rate of file operations that do modify persistent state and excluding the write operation, that the Cache sends to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadIOPS", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetReadIOPS", + "localizedValue": "StorageTarget Read IOPS" + }, + "displayDescription": "The rate of file read operations the Cache sends to a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "CountPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetReadAheadThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetReadAheadThroughput", + "localizedValue": "StorageTarget Read Ahead Throughput" + }, + "displayDescription": "The rate the Cache opportunisticly reads data from the StorageTarget.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetFillThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetFillThroughput", + "localizedValue": "StorageTarget Fill Throughput" + }, + "displayDescription": "The rate the Cache reads data from the StorageTarget to handle a cache miss.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + }, + { + "id": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache/providers/microsoft.insights/metricdefinitions/StorageTargetTotalReadThroughput", + "resourceId": "/subscriptions/46841c0e-69c8-4b17-af46-6626ecb15fc2/resourceGroups/adgarntptestrg/providers/Microsoft.StorageCache/caches/adgarntptestcache", + "namespace": "microsoft.storagecache/caches", + "metricClass": "Transactions", + "name": { + "value": "StorageTargetTotalReadThroughput", + "localizedValue": "StorageTarget Total Read Throughput" + }, + "displayDescription": "The total rate that the Cache reads data from a particular StorageTarget.", + "isDimensionRequired": false, + "unit": "BytesPerSecond", + "primaryAggregationType": "Average", + "supportedAggregationTypes": [ + "Minimum", + "Maximum", + "Average" + ], + "metricAvailabilities": [ + { + "timeGrain": "PT1M", + "retention": "P93D" + }, + { + "timeGrain": "PT5M", + "retention": "P93D" + }, + { + "timeGrain": "PT15M", + "retention": "P93D" + }, + { + "timeGrain": "PT30M", + "retention": "P93D" + }, + { + "timeGrain": "PT1H", + "retention": "P93D" + }, + { + "timeGrain": "PT6H", + "retention": "P93D" + }, + { + "timeGrain": "PT12H", + "retention": "P93D" + }, + { + "timeGrain": "P1D", + "retention": "P93D" + } + ], + "dimensions": [ + { + "value": "StorageTarget", + "localizedValue": "StorageTarget" + } + ] + } + ] + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json new file mode 100644 index 000000000000..f14307c51dc0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/examples/GetMetricError.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "resourceUri": "subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo", + "timespan": "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z", + "metricnames": "MongoRequestsCount,MongoRequests", + "metricnamespace": "microsoft.documentdb/databaseaccounts", + "aggregation": "average", + "interval": "FULL", + "api-version": "2018-01-01" + }, + "responses": { + "200": { + "body": { + "cost": 239, + "timespan": "2021-06-07T21:51:00Z/2021-06-08T01:51:00Z", + "interval": "PT4H", + "value": [ + { + "id": "/subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequestsCount", + "type": "Microsoft.Insights/metrics", + "name": { + "value": "MongoRequestsCount", + "localizedValue": "(deprecated) Mongo Request Rate" + }, + "unit": "CountPerSecond", + "timeseries": [], + "errorMessage": "Sampling type is not found. Metric:CosmosDBCustomer,AzureMonitor,MongoRequests, SamplingType:NullableAverage.", + "errorCode": "InvalidSamplingType" + }, + { + "id": "/subscriptions/ac41e21f-afd6-4a79-8070-f01eba278f97/resourceGroups/todking/providers/Microsoft.DocumentDb/databaseAccounts/tk-cosmos-mongo/providers/Microsoft.Insights/metrics/MongoRequests", + "type": "Microsoft.Insights/metrics", + "name": { + "value": "MongoRequests", + "localizedValue": "Mongo Requests" + }, + "displayDescription": "Number of Mongo Requests Made", + "unit": "Count", + "timeseries": [ + { + "metadatavalues": [], + "data": [ + { + "timeStamp": "2021-06-07T21:51:00Z", + "average": 0.0 + } + ] + } + ], + "errorCode": "Success" + } + ], + "namespace": "microsoft.documentdb/databaseaccounts", + "resourceregion": "westus2" + } + } + } +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json index c31a95ffd085..2ee9ebc037ef 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metricDefinitions_API.json @@ -2,9 +2,6 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "x-ms-code-generation-settings": { - "name": "MonitorManagementClient" - }, "version": "2018-01-01" }, "host": "management.azure.com", @@ -36,7 +33,7 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/metricDefinitions": { + "/{resourceUri}/providers/Microsoft.Insights/metricDefinitions": { "get": { "tags": [ "MetricDefinitions" @@ -77,6 +74,9 @@ }, "Get Application Insights Metric Definitions without filter": { "$ref": "./examples/GetMetricDefinitionsApplicationInsights.json" + }, + "Get StorageCache Metric Definitions with metric class": { + "$ref": "./examples/GetMetricDefinitionsMetricClass.json" } } } @@ -100,6 +100,7 @@ "description": "The localizable string class." }, "MetricAvailability": { + "type": "object", "properties": { "timeGrain": { "type": "string", @@ -153,7 +154,23 @@ "modelAsString": false } }, + "MetricClass": { + "type": "string", + "description": "The class of the metric.", + "enum": [ + "Availability", + "Transactions", + "Errors", + "Latency", + "Saturation" + ], + "x-ms-enum": { + "name": "MetricClass", + "modelAsString": true + } + }, "MetricDefinition": { + "type": "object", "properties": { "isDimensionRequired": { "type": "boolean", @@ -179,9 +196,13 @@ "type": "string", "description": "Custom category name for this metric." }, + "metricClass": { + "$ref": "#/definitions/MetricClass", + "description": "The class of the metric." + }, "unit": { "$ref": "#/definitions/Unit", - "description": "the unit of the metric." + "description": "The unit of the metric." }, "primaryAggregationType": { "$ref": "#/definitions/AggregationType", @@ -216,6 +237,7 @@ "description": "Metric definition class specifies the metadata for a metric." }, "MetricDefinitionCollection": { + "type": "object", "properties": { "value": { "type": "array", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json index ebe83fb067d3..e196cf744cf7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-01-01/metrics_API.json @@ -33,7 +33,7 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/metrics": { + "/{resourceUri}/providers/Microsoft.Insights/metrics": { "get": { "tags": [ "Metrics" @@ -100,6 +100,9 @@ }, "Get Metric for metadata": { "$ref": "./examples/GetMetricMetadata.json" + }, + "Get Metric with error": { + "$ref": "./examples/GetMetricError.json" } } } @@ -146,6 +149,7 @@ } }, "MetricValue": { + "type": "object", "required": [ "timeStamp" ], @@ -184,6 +188,7 @@ "description": "Represents a metric value." }, "MetadataValue": { + "type": "object", "properties": { "name": { "$ref": "#/definitions/LocalizableString", @@ -196,20 +201,6 @@ }, "description": "Represents a metric metadata value." }, - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } - } - }, "Response": { "type": "object", "properties": { @@ -273,9 +264,13 @@ "type": "string", "description": "'Success' or the error details on query failures for this metric." }, + "errorMessage": { + "type": "string", + "description": "Error message encountered querying this specific metric." + }, "unit": { "$ref": "#/definitions/Unit", - "description": "the unit of the metric." + "description": "The unit of the metric." }, "timeseries": { "type": "array", @@ -289,7 +284,6 @@ "id", "type", "name", - "displayDescription", "unit", "timeseries" ], @@ -314,6 +308,20 @@ } }, "description": "A time series result type. The discriminator value is always TimeSeries in this case." + }, + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } } }, "parameters": { diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 9a5fe8bb80d2..58325a771436 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -659,6 +659,14 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' + - suppress: MissingTypeObject + from: metrics_API.json + where: $.definitions.LocalizableString + reason: 'LocalizableString exists in other swaggers my team can not modify' + - suppress: MissingTypeObject + from: metricDefinitions_API.json + where: $.definitions.LocalizableString + reason: 'LocalizableString exists in other swaggers my team can not modify' - suppress: OperationsAPIImplementation where: $.paths from: activityLogAlerts_API.json