All Products
Search
Document Center

CloudMonitor:DescribeMonitoringAgentStatuses

Last Updated:Jul 26, 2024

Queries the status of the CloudMonitor agent.

Operation description

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.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
cms:DescribeMonitoringAgentStatusesget
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdsstringYes

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

i-hp3dunahluwajv6f****
HostAvailabilityTaskIdstringNo

The ID of the availability monitoring task.

126****

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

Response parameters

ParameterTypeDescriptionExample
object

The results returned.

Codestring

The HTTP status code.

Note 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.

object
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.

Examples

Sample success responses

JSONformat

{
  "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": ""
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterInvalidIllegal parameters.-
403AccessForbiddenUser not authorized to operate on the specified resource.-
404ResourceNotFoundThe specified resource is not found.The specified resource is not found.
500InternalError%s-

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-24The Error code has changed. The response structure of the API has changedView Change Details
2023-07-19The Error code has changed. The response structure of the API has changedView Change Details
2023-05-04The Error code has changed. The response structure of the API has changedView Change Details