调用DescribeMonitoringAgentProcesses接口查询指定资源的进程数列表。
说明 调用本接口之前,您需要先调用CreateMonitoringAgentProcess接口创建进程数。更多信息,请参见CreateMonitoringAgentProcess。
本文将提供一个示例,查询资源i-hp3hl3cx1pbahzy8****
的进程数列表。返回结果显示进程数Nginx
和HTTP
的详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeMonitoringAgentProcesses |
要执行的操作,取值:DescribeMonitoringAgentProcesses。 |
InstanceId | String | 是 | i-hp3hl3cx1pbahzy8**** |
实例ID。 |
关于公共请求参数的详情,请参见公共参数。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | 200 |
状态码。 说明 200表示成功。
|
Message | String | The specified resource is not found. |
错误信息。 |
NodeProcesses | Array of NodeProcess |
进程数列表。 |
|
NodeProcess | |||
Command | String | number |
用于取得指定进程数信息的指令。目前仅支持 说明
number 表示匹配条件的进程数。
|
GroupId | String | 3619**** |
应用分组ID。 |
InstanceId | String | i-hp3hl3cx1pbahzy8**** |
实例ID。 |
ProcessId | Long | 234567 |
进程ID。 |
ProcessName | String | Nginx |
进程名称。 |
ProcessUser | String | alice |
执行进程的用户。 |
RequestId | String | C11C0E85-6862-4F25-8D66-D6A5E0882984 |
请求ID。 |
Success | Boolean | true |
操作是否成功。取值:
|
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeMonitoringAgentProcesses
&InstanceId=i-hp3hl3cx1pbahzy8****
&<公共请求参数>
正常返回示例
XML
格式
<DescribeMonitoringAgentProcessesResponse>
<RequestId>C11C0E85-6862-4F25-8D66-D6A5E0882984</RequestId>
<NodeProcesses>
<NodeProcess>
<ProcessName>HTTP</ProcessName>
<InstanceId>i-hp3hl3cx1pbahzy8****</InstanceId>
<Command>number</Command>
<ProcessId>123456</ProcessId>
</NodeProcess>
<NodeProcess>
<ProcessName>Nginx</ProcessName>
<ProcessUser>alice</ProcessUser>
<GroupId>3619****</GroupId>
<InstanceId>i-hp3hl3cx1pbahzy8****</InstanceId>
<Command>number</Command>
<ProcessId>234567</ProcessId>
</NodeProcess>
</NodeProcesses>
<Code>200</Code>
<Success>true</Success>
</DescribeMonitoringAgentProcessesResponse>
JSON
格式
{
"RequestId": "C11C0E85-6862-4F25-8D66-D6A5E0882984",
"NodeProcesses": {
"NodeProcess": [
{
"ProcessName": "HTTP",
"InstanceId": "i-hp3hl3cx1pbahzy8****",
"Command": "number",
"ProcessId": 123456
},
{
"ProcessName": "Nginx",
"ProcessUser": "alice",
"GroupId": "3619****",
"InstanceId": "i-hp3hl3cx1pbahzy8****",
"Command": "number",
"ProcessId": 234567
}
]
},
"Code": 200,
"Success": true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
404 | ResourceNotFound | The specified resource is not found. | 未找到指定资源。 |
访问错误中心查看更多错误码。