DescribeMonitoringAgentStatuses - 查询云监控插件运行状态

调用DescribeMonitoringAgentStatuses接口查询云监控插件运行状态。

接口说明

This topic describes how to query the status of the CloudMonitor agent that is installed on the i-hp3dunahluwajv6f**** instance. The result indicates that the CloudMonitor agent is in the running state.

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
cms:DescribeMonitoringAgentStatusesget
*全部资源
*

请求参数

名称类型必填描述示例值
InstanceIdsstring

The instance IDs. Separate multiple instance IDs with commas (,).

i-hp3dunahluwajv6f****
HostAvailabilityTaskIdstring

The ID of the availability monitoring task.

126****

For more information about common request parameters, see Common parameters.

返回参数

名称类型描述示例值
object

The response parameters.

Codestring

The HTTP status code.

说明 The status code 200 indicates that the request was successful.
200
Messagestring

The error message.

The specified resource is not found.
RequestIdstring

The request ID.

6F8371DF-AB81-41B8-9E1B-5493B3FF0E4F
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true
NodeStatusListarray<object>

The host status information.

NodeStatusobject
Statusstring

The status of the CloudMonitor agent. Valid values:

  • running: The CloudMonitor agent is running.
  • stopped: The CloudMonitor agent is stopped.
  • installing: The CloudMonitor agent is being installed.
  • install_faild: The CloudMonitor agent fails to be installed.
  • abnormal: The CloudMonitor agent is not properly installed.
  • not_installed: The CloudMonitor agent is not installed.
running
InstanceIdstring

The instance ID.

i-hp3dunahluwajv6f****
AutoInstallboolean

Indicates whether the CloudMonitor agent is automatically installed. Valid values:

  • true: The CloudMonitor agent is automatically installed.
  • false: The CloudMonitor agent is not automatically installed.
true
OsMonitorStatusstring

The status of SysOM. Valid values:

  • installing: SysOM is being installed.
  • running: SysOM is running.
  • stopped: SysOM is stopped.
  • uninstalling: SysOM is being uninstalled.
running
OsMonitorErrorCodestring

The error status of SysOM. Valid values:

  • install_fail: SysOM fails to be installed or an unknown error occurs.
  • install_assist_invalid: SysOM fails to be installed because the status of Cloud Assistant is invalid.
  • install_assist_command_fail: SysOM fails to be installed because the installation command fails to run.
  • uninstall_fail: SysOM fails to be uninstalled or an unknown error occurs.
  • uninstall_assist_invalid: SysOM fails to be uninstalled because the status of Cloud Assistant is invalid.
  • uninstall_assist_command_fail: SysOM fails to be uninstalled because the uninstallation command fails to run.
install_fail
OsMonitorErrorDetailstring

The details of the execution error. Valid values:

  • Command.ErrorCode.Fail.Downlaod.REGIN_ID: Failed to obtain the region ID.
  • Command.ErrorCode.Fail.Downlaod.SYSAK: Failed to download the .rpm package of System Analyse Kit (SysAK).
  • Command.ErrorCode.Fail.Downlaod.CMON_FILE: Failed to download the CMON file.
  • Command.ErrorCode.Fail.Downlaod.BTF: Failed to start SysAK because the BTF file is not found.
  • Command.ErrorCode.Fail.Start.SYSAK: Failed to start SysAK due to an unknown error.
Command.ErrorCode.Fail.Downlaod.REGIN_ID
OsMonitorVersionstring

The SysOM version.

1.3.0-12
OsMonitorConfigstring

Indicates whether the SysAK monitoring feature is enabled.`` Valid values:

  • true: The SysAK monitoring feature is enabled.
  • false: the SysAK monitoring feature is disabled.
{"sysak":true}
AgentInstallErrorCodestring

The error code returned when the CloudMonitor agent is installed. Valid values:

  • Common.Timeout: The installation timed out.
  • Common.SLR: The service-linked role for CloudMonitor is unauthorized.
  • Common.OS: The operating system is not supported.
  • Assist.Invalid: Cloud Assistant is not running.
  • Assist.Invoke: An error occurred when the installation program is started.
  • Assist.Execute: An error occurred when the installation program is running.
Assist.Invalid

示例

正常返回示例

JSON格式

{
  "Code": 200,
  "Message": "The specified resource is not found.",
  "RequestId": "6F8371DF-AB81-41B8-9E1B-5493B3FF0E4F",
  "Success": true,
  "NodeStatusList": {
    "NodeStatus": [
      {
        "Status": "running",
        "InstanceId": "i-hp3dunahluwajv6f****",
        "AutoInstall": true,
        "OsMonitorStatus": "running",
        "OsMonitorErrorCode": "install_fail",
        "OsMonitorErrorDetail": "Command.ErrorCode.Fail.Downlaod.REGIN_ID",
        "OsMonitorVersion": "1.3.0-12",
        "OsMonitorConfig": {
          "sysak": true
        },
        "AgentInstallErrorCode": "Assist.Invalid"
      }
    ]
  }
}

错误码

HTTP status code错误码错误信息描述
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.未找到指定资源。
500InternalError%s-

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-11-24OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更查看变更详情
2023-07-19OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更查看变更详情
2023-05-04OpenAPI 错误码发生变更、OpenAPI 返回结构发生变更查看变更详情