調用DescribeGroupMonitoringAgentProcess介面擷取組進程監控工作清單。
介面說明
組進程監控用於為組內的所有 ECS 執行個體或滿足條件的 ECS 執行個體同時添加一個進程監控並設定警示規則。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
cms:DescribeGroupMonitoringAgentProcess |
get |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| GroupId |
string |
是 |
應用分組 ID。 |
12345 |
| ProcessName |
string |
否 |
進程名稱。 |
sshd |
| PageNumber |
integer |
否 |
分頁頁碼。預設值:1。 |
1 |
| PageSize |
integer |
否 |
分頁大小。預設值:10。 |
10 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
返回結果。 |
||
| RequestId |
string |
請求 ID。 |
7985D471-3FA8-4EE9-8F4B-45C19DF3D36F |
| Success |
boolean |
操作是否成功。true 表示成功,false 表示失敗。 |
true |
| Code |
string |
狀態代碼。 說明
200 表示成功。 |
200 |
| Message |
string |
錯誤資訊。 |
The Request is not authorization. |
| PageNumber |
string |
分頁碼。預設值:1。 |
1 |
| PageSize |
string |
每頁顯示記錄條數。預設值:10。 |
10 |
| Total |
string |
總記錄條數。 |
28 |
| Processes |
object |
||
| Process |
array<object> |
進程工作清單。 |
|
|
array<object> |
進程任務。 |
||
| ProcessName |
string |
進程名稱。 |
sshd |
| MatchExpressFilterRelation |
string |
匹配執行個體的條件。取值:
|
and |
| GroupId |
string |
應用分組的 ID。 |
12345 |
| Id |
string |
進程任務的 ID。 |
3F6150F9-45C7-43F9-9578-A58B2E72**** |
| MatchExpress |
object |
||
| MatchExpress |
array<object> |
匹配條件。 說明
只有符合匹配條件的應用分組,執行個體才能被添加到對應的進程中。 |
|
|
object |
匹配條件。 |
||
| Value |
string |
匹配執行個體名稱。 |
portalHost |
| Name |
string |
匹配條件的類型。 說明
目前僅支援 |
name |
| Function |
string |
匹配條件。取值:
說明
對於滿足條件的規則,執行個體會添加對應的進程監控。 |
all |
| AlertConfig |
object |
||
| AlertConfig |
array<object> |
警示規則配置資訊。 |
|
|
array<object> |
警示規則配置資訊。 |
||
| ComparisonOperator |
string |
Critical 層級閾值比較符。取值:
|
GreaterThanOrEqualToThreshold |
| SilenceTime |
string |
通道沉默周期。單位:秒。最短:3600 秒(1 小時),預設值:86400 秒(1 天)。 說明
當監控資料持續超過警示規則閾值時,每個沉默周期內只發送一次警示通知。 |
86400 |
| Webhook |
string |
警示發生時回調指定的 URL 地址,向 URL 發送 POST 請求。 |
http://www.aliyun.com |
| Times |
string |
層級連續出現次數。 說明
只有當層級連續出現設定的次數且超過閾值時,才會觸發警示。 |
3 |
| EscalationsLevel |
string |
警示的層級。取值:
|
warn |
| NoEffectiveInterval |
string |
警示規則不生效時間段。 |
00:00-23:59 |
| EffectiveInterval |
string |
警示規則的生效時間段。 |
00:00-23:59 |
| Threshold |
string |
警示閾值。 |
5 |
| Statistics |
string |
警示統計方法。 |
Average |
| TargetList |
object |
||
| Target |
array<object> |
警示觸發目標列表。 |
|
|
object |
警示觸發目標。 |
||
| Id |
string |
警示觸發目標 ID。 |
123 |
| Arn |
string |
資源 ARN。格式為 acs:{雲產品縮寫}:{regionId}:{userId}:/{資源類型}/{資源名稱}/message。例如:acs:mns:cn-hangzhou:120886317861****:/queues/test123/message。參數說明如下:
|
acs:mns:cn-hangzhou:120886317861****:/queues/test/message |
| Level |
string |
警示層級。取值:
|
CRITICAL |
| JsonParmas |
string |
警示回調的 JSON 格式參數。 |
{"customField1":"value1","customField2":"$.name"} |
樣本
正常返回樣本
JSON格式
{
"RequestId": "7985D471-3FA8-4EE9-8F4B-45C19DF3D36F",
"Success": true,
"Code": "200",
"Message": "The Request is not authorization.",
"PageNumber": "1",
"PageSize": "10",
"Total": "28",
"Processes": {
"Process": [
{
"ProcessName": "sshd",
"MatchExpressFilterRelation": "and",
"GroupId": "12345",
"Id": "3F6150F9-45C7-43F9-9578-A58B2E72****",
"MatchExpress": {
"MatchExpress": [
{
"Value": "portalHost",
"Name": "name",
"Function": "all"
}
]
},
"AlertConfig": {
"AlertConfig": [
{
"ComparisonOperator": "GreaterThanOrEqualToThreshold",
"SilenceTime": "86400",
"Webhook": "http://www.aliyun.com",
"Times": "3",
"EscalationsLevel": "warn",
"NoEffectiveInterval": "00:00-23:59",
"EffectiveInterval": "00:00-23:59",
"Threshold": "5",
"Statistics": "Average",
"TargetList": {
"Target": [
{
"Id": "123",
"Arn": "acs:mns:cn-hangzhou:120886317861****:/queues/test/message",
"Level": "CRITICAL",
"JsonParmas": "{\"customField1\":\"value1\",\"customField2\":\"$.name\"}"
}
]
}
}
]
}
}
]
}
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | ParameterInvalid | Illegal parameters. | |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | AccessForbidden | User not authorized to operate on the specified resource. | |
| 404 | ResourceNotFound | The specified resource is not found. | 未找到指定資源。 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。