Databases - List Metric Definitions
傳回資料庫計量定義。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions?api-version=2014-04-01
URI 參數
| 名稱 | 位於 | 必要 | 類型 | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
資料庫的名稱。 |
|
resource
|
path | True |
string |
包含資源的資源群組名稱。 您可以從 Azure Resource Manager API 或入口網站取得此值。 |
|
server
|
path | True |
string |
伺服器的名稱。 |
|
subscription
|
path | True |
string |
識別 Azure 訂用帳戶的訂用帳戶標識碼。 |
|
api-version
|
query | True |
string |
要用於要求的 API 版本。 |
回覆
| 名稱 | 類型 | Description |
|---|---|---|
| 200 OK |
還行 |
範例
List database usage metrics
範例要求
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-6730/providers/Microsoft.Sql/servers/sqlcrudtest-9007/databases/3481/metricDefinitions?api-version=2014-04-01
範例回覆
{
"value": [
{
"name": {
"value": "cpu_percent",
"localizedValue": "CPU percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT15S",
"retention": "PT1H"
},
{
"timeGrain": "PT60S",
"retention": "PT1H"
},
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "physical_data_read_percent",
"localizedValue": "Data IO percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT15S",
"retention": "PT1H"
},
{
"timeGrain": "PT60S",
"retention": "PT1H"
},
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "log_write_percent",
"localizedValue": "Log IO percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT15S",
"retention": "PT1H"
},
{
"timeGrain": "PT60S",
"retention": "PT1H"
},
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "dtu_consumption_percent",
"localizedValue": "DTU percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT15S",
"retention": "PT1H"
},
{
"timeGrain": "PT60S",
"retention": "PT1H"
},
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "storage",
"localizedValue": "Total database size"
},
"unit": "Bytes",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Maximum",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "xtp_storage_percent",
"localizedValue": "In-Memory OLTP storage percent"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT15S",
"retention": "PT1H"
},
{
"timeGrain": "PT60S",
"retention": "PT1H"
},
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "workers_percent",
"localizedValue": "Workers percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "sessions_percent",
"localizedValue": "Sessions percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "dtu_limit",
"localizedValue": "DTU limit"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "dtu_used",
"localizedValue": "DTU used"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Average",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "connection_successful",
"localizedValue": "Successful Connections"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Total",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "connection_failed",
"localizedValue": "Failed Connections"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Total",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "blocked_by_firewall",
"localizedValue": "Blocked by Firewall"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Total",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "deadlock",
"localizedValue": "Deadlocks"
},
"unit": "Count",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Total",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
},
{
"name": {
"value": "storage_percent",
"localizedValue": "Database size percentage"
},
"unit": "Percent",
"resourceUri": "/subscriptions/b6a6e0c5-e79c-4c6d-a878-72eafbca4cf2/resourceGroups/QA/providers/Microsoft.Sql/servers/nafantest/databases/db1",
"primaryAggregationType": "Maximum",
"metricAvailabilities": [
{
"timeGrain": "PT5M",
"retention": "P14D"
},
{
"timeGrain": "PT1H",
"retention": "P14D"
},
{
"timeGrain": "P1D",
"retention": "P14D"
}
]
}
]
}
定義
| 名稱 | Description |
|---|---|
|
Metric |
計量可用性值。 |
|
Metric |
資料庫計量定義。 |
|
Metric |
清單資料庫計量定義要求的回應。 |
|
Metric |
資料庫計量名稱。 |
|
Primary |
定義計量值顯示方式的主要匯總類型。 |
|
Unit |
計量的單位。 |
MetricAvailability
計量可用性值。
| 名稱 | 類型 | Description |
|---|---|---|
| retention |
string |
資料庫計量的保留長度。 |
| timeGrain |
string |
資料庫計量的數據粒度。 |
MetricDefinition
資料庫計量定義。
| 名稱 | 類型 | Description |
|---|---|---|
| metricAvailabilities |
計量的資料庫計量可用性清單。 |
|
| name |
計量的名稱資訊。 |
|
| primaryAggregationType |
定義計量值顯示方式的主要匯總類型。 |
|
| resourceUri |
string |
資料庫的資源 URI。 |
| unit |
計量的單位。 |
MetricDefinitionListResult
清單資料庫計量定義要求的回應。
| 名稱 | 類型 | Description |
|---|---|---|
| value |
資料庫的計量定義清單。 |
MetricName
資料庫計量名稱。
| 名稱 | 類型 | Description |
|---|---|---|
| localizedValue |
string |
資料庫計量的易記名稱。 |
| value |
string |
資料庫計量的名稱。 |
PrimaryAggregationType
定義計量值顯示方式的主要匯總類型。
| 值 | Description |
|---|---|
| None | |
| Average | |
| Count | |
| Minimum | |
| Maximum | |
| Total |
UnitDefinitionType
計量的單位。
| 值 | Description |
|---|---|
| Count | |
| Bytes | |
| Seconds | |
| Percent | |
| CountPerSecond | |
| BytesPerSecond |