Diagnostics - Execute Site Detector
執行偵測器的描述
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute?api-version=2023-12-01
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute?startTime={startTime}&endTime={endTime}&timeGrain={timeGrain}&api-version=2023-12-01
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
detector
|
path | True |
string |
偵測器資源名稱 |
diagnostic
|
path | True |
string |
類別名稱 |
resource
|
path | True |
string |
資源所屬資源群組的名稱。 Regex pattern: |
site
|
path | True |
string |
網站名稱 |
subscription
|
path | True |
string |
您的 Azure 訂用帳戶識別碼。 這是 GUID 格式的字串 (例如 0000000000-0000-0000-0000-0000000000000) 。 |
api-version
|
query | True |
string |
API 版本 |
end
|
query |
string date-time |
結束時間 |
|
start
|
query |
string date-time |
開始時間 |
|
time
|
query |
string |
時間精細度 Regex pattern: |
回應
名稱 | 類型 | Description |
---|---|---|
200 OK |
確定 |
|
Other Status Codes |
App Service 錯誤回應。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名稱 | Description |
---|---|
user_impersonation | 模擬您的用戶帳戶 |
範例
Execute site detector |
Execute site slot detector |
Execute site detector
Sample Request
POST https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/detectors/sitecrashes/execute?api-version=2023-12-01
Sample Response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/detectors/sitecrashes",
"name": "sitecrashes",
"properties": {
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"abnormalTimePeriods": [
{
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"solutions": []
}
]
}
}
Execute site slot detector
Sample Request
POST https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/diagnostics/availability/detectors/sitecrashes/execute?api-version=2023-12-01
Sample Response
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/Sample-WestUSResourceGroup/providers/Microsoft.Web/sites/SampleApp/slots/staging/diagnostics/availability/detectors/sitecrashes",
"name": "sitecrashes",
"properties": {
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"abnormalTimePeriods": [
{
"startTime": "2017-11-05T22:50:00Z",
"endTime": "2017-11-06T22:50:00Z",
"solutions": []
}
]
}
}
定義
名稱 | Description |
---|---|
Data |
類別,表示偵測器所使用的數據源 |
Default |
App Service 錯誤回應。 |
Details | |
Detector |
類別,表示偵測到異常時間週期。 |
Detector |
代表偵測器定義的類別 |
Diagnostic |
代表診斷偵測器回應的類別 |
Diagnostic |
代表診斷計量的類別 |
Diagnostic |
代表診斷計量信息的類別 |
Error |
錯誤模型。 |
Issue |
表示偵測器的類型 |
Name |
名稱值組。 |
Response |
|
Solution |
類別,代表偵測到問題的解決方案。 |
Solution |
方案類型 |
DataSource
類別,表示偵測器所使用的數據源
名稱 | 類型 | Description |
---|---|---|
dataSourceUri |
數據源 URI 連結 |
|
instructions |
string[] |
數據源是否有任何的指示 |
DefaultErrorResponse
App Service 錯誤回應。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤模型。 |
Details
名稱 | 類型 | Description |
---|---|---|
code |
string |
標準化字串,以程序設計方式識別錯誤。 |
message |
string |
詳細的錯誤描述和偵錯資訊。 |
target |
string |
詳細的錯誤描述和偵錯資訊。 |
DetectorAbnormalTimePeriod
類別,表示偵測到異常時間週期。
名稱 | 類型 | Description |
---|---|---|
endTime |
string |
相互關聯的事件結束時間 |
message |
string |
描述事件的訊息 |
metaData |
停機時間元數據 |
|
priority |
number |
表示偵測器的排名 |
solutions |
Solution[] |
建議的解決方案清單 |
source |
string |
表示偵測器的名稱 |
startTime |
string |
相互關聯的事件的開始時間 |
type |
表示偵測器的類型 |
DetectorDefinition
代表偵測器定義的類別
名稱 | 類型 | Description |
---|---|---|
description |
string |
偵測器的描述 |
displayName |
string |
偵測器的顯示名稱 |
isEnabled |
boolean |
旗標,表示是否啟用偵測器。 |
rank |
number |
偵測器排名 |
DiagnosticDetectorResponse
代表診斷偵測器回應的類別
名稱 | 類型 | Description |
---|---|---|
id |
string |
資源標識碼。 |
kind |
string |
資源種類。 |
name |
string |
資源名稱。 |
properties.abnormalTimePeriods |
偵測器找到的相互關聯事件清單 |
|
properties.data |
偵測器想要傳送的其他數據。 |
|
properties.detectorDefinition |
偵測器的定義 |
|
properties.endTime |
string |
期間結束時間 |
properties.issueDetected |
boolean |
偵測到代表問題的旗標。 |
properties.metrics |
偵測器所提供的計量 |
|
properties.responseMetaData |
元數據 |
|
properties.startTime |
string |
期間開始時間 |
type |
string |
資源類型。 |
DiagnosticMetricSample
代表診斷計量的類別
名稱 | 類型 | Description |
---|---|---|
isAggregated |
boolean |
值是否匯總到所有背景工作角色 |
maximum |
number |
在期間內取樣的計量上限 |
minimum |
number |
在期間內取樣的計量下限 |
roleInstance |
string |
角色實例。 如果此計數器不是每個實例,則會傳回此計數器,而且應該是我們想要傳回的實例名稱,也就是 CPU 和記憶體傳回 RDWORKERNAME (LargeDed..._IN_0) 其中 RDWORKERNAME 是下方的電腦名稱,並在括弧中傳回 RoleInstance 名稱 |
timestamp |
string |
測量計量的時間 |
total |
number |
計量的總值。 如果進行多個度量,這將會有全部的總和。 |
DiagnosticMetricSet
代表診斷計量信息的類別
名稱 | 類型 | Description |
---|---|---|
endTime |
string |
期間結束時間 |
name |
string |
計量的名稱 |
startTime |
string |
期間開始時間 |
timeGrain |
string |
呈現的時間粒度。 目前支援的粒度為 PT1M、PT1H、P1D |
unit |
string |
計量的單位 |
values |
根據 {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} 的計量值集合 |
Error
錯誤模型。
名稱 | 類型 | Description |
---|---|---|
code |
string |
標準化字串,以程序設計方式識別錯誤。 |
details |
Details[] |
詳細的錯誤。 |
innererror |
string |
偵錯錯誤的詳細資訊。 |
message |
string |
詳細的錯誤描述和偵錯資訊。 |
target |
string |
詳細的錯誤描述和偵錯資訊。 |
IssueType
表示偵測器的類型
名稱 | 類型 | Description |
---|---|---|
AppCrash |
string |
|
AppDeployment |
string |
|
AseDeployment |
string |
|
Other |
string |
|
PlatformIssue |
string |
|
RuntimeIssueDetected |
string |
|
ServiceIncident |
string |
|
UserIssue |
string |
NameValuePair
名稱值組。
名稱 | 類型 | Description |
---|---|---|
name |
string |
配對名稱。 |
value |
string |
配對值。 |
ResponseMetaData
名稱 | 類型 | Description |
---|---|---|
dataSource |
數據源 |
Solution
類別,代表偵測到問題的解決方案。
名稱 | 類型 | Description |
---|---|---|
data |
解決方案數據。 |
|
description |
string |
解決方案的描述 |
displayName |
string |
解決方案的顯示名稱 |
id |
number |
解決方案標識碼。 |
metadata |
解決方案元數據。 |
|
order |
number |
解決方案的順序。 |
type |
方案類型 |
SolutionType
方案類型
名稱 | 類型 | Description |
---|---|---|
BestPractices |
string |
|
DeepInvestigation |
string |
|
QuickSolution |
string |