• Cloud Eye

ces
  1. Help Center
  2. Cloud Eye
  3. API Reference
  4. API Description
  5. Monitoring Data Management
  6. Querying the Host Configuration

Querying the Host Configuration

Function

This API is used to query the host configuration for a specified event type in a specified period of time. You can specify the dimension of data to be queried.

This API is provided for SAP Monitor in the HANA scenario to query the host configuration. In other scenarios, the host configuration cannot be queried with this API.

URI

GET /V1.0/{project_id}/event-data

  • Parameter description
    Table 1 Parameter description

    Parameter

    Description

    project_id

    Indicates the project ID.

  • Parameters that are used to query the host configuration

    Parameter

    Mandatory

    Type

    Description

    namespace

    Yes

    String

    Indicates the namespace, such as ECS Namespace.

    type

    Yes

    String

    Indicates the event type.

    It can contain only letters, underscores (_), and hyphens (-). It must start with a letter and cannot exceed 64 characters, for example, instance_host_info.

    from

    Yes

    Timestamp

    Indicates the start time of the query.

    The value is a UNIX timestamp and the unit is ms.

    to

    Yes

    Timestamp

    Indicates the end time of the query.

    The value is a UNIX timestamp and the unit is ms.

    The value of parameter from must be earlier than that of parameter to.

    dim

    Yes

    String

    Indicates the metric dimension. A maximum of three dimensions are supported, and the dimensions are numbered from 0 in dim.{i}=key,value format. For details, see Dimension. The key value cannot exceed 32 characters and the value value cannot exceed 256 characters.

    Example: dim.0=instance_id,i-12345

  • Example
    /V1.0/{project_id}/event-data?namespace=SYS.ECS&dim.0=instance_id,33328f02-3814-422e-b688-bfdba93d4051&type=instance_host_info&from=1450234543422&to=1450320943422

Request

None

Response

  • Response parameters
    Table 2 Response parameters

    Parameter

    Type

    Description

    datapoints

    JSON array

    Indicates the configuration list.

    If the corresponding configuration information does not exist, datapoints is an empty array and is [].

    type

    String

    Indicates the event type, for example, instance_host_info.

    timestamp

    Timestamp

    Indicates the time when an event is reported.

    value

    String

    Indicates the host configuration information.

  • Example response
    {
        "datapoints": [
            {
                "type": "instance_host_info",
                "timestamp": 1450231200000,
                "value": "xxx"
            },
            {
                "type": "instance_host_info",
                "timestamp": 1450231800000,
                "value": "xxx"
            }
        ]
    }

Returned Values

  • Normal

    200

  • Abnormal

    Returned Values

    Description

    400 Bad Request

    Request error

    401 Unauthorized

    The authentication information is not provided or is incorrect.

    403 Forbidden

    You are forbidden to access the page requested.

    408 Request Timeout

    The request timed out.

    429 Too Many Requests

    Concurrent requests are excessive.

    500 Internal Server Error

    Failed to complete the request because of an internal service error.

    503 Service Unavailable

    The service is currently unavailable.

Error Code

For details, see Error Codes.