Help Center> Cloud Eye> API Reference> API V1> Monitoring Data> Querying the Host Configuration
Updated on 2023-08-15 GMT+08:00

Querying the Host Configuration

Function

This API is used to query the host configuration for a specified event type in a specified time range. 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.

Debugging

You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.

URI

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

  • Parameter description
    Table 1 Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    For details about how to obtain the project ID, see Obtaining a Project ID.

  • Parameters that are used to query the host configuration

    Parameter

    Mandatory

    Type

    Description

    namespace

    Yes

    String

    Query the namespace of a service. For details, see Services Interconnected with Cloud Eye.

    The namespace must be in the service.item format and contain 3 to 32 characters. service and item each must start with a letter and contain only letters, digits, and underscores (_).

    type

    Yes

    String

    Specifies 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

    String

    Specifies the start time of the query.

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

    to

    Yes

    String

    Specifies the end time of the query.

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

    from must be earlier than to.

    dim

    Yes

    String

    Specifies the dimension. For example, the ECS dimension is instance_id. For details about the dimensions corresponding to the monitoring metrics of each service, see the monitoring metrics description of the corresponding service in Services Interconnected with Cloud Eye.

    Specifies the dimension. A maximum of three dimensions are supported, and the dimensions are numbered from 0 in dim.{i}=key,value format. key cannot exceed 32 characters and value cannot exceed 256 characters.

    Example: dim.0=instance_id,i-12345

  • Example: Query the configuration information about the ECS whose ID is 33328f02-3814-422e-b688-bfdba93d4051 and type is instance_host_info.
    GET https://{Cloud Eye endpoint}/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

    Array of objects

    Specifies the configuration list.

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

    For details, see Table 3.

    Table 3 datapoints data structure description

    Parameter

    Type

    Description

    type

    String

    Specifies the event type, for example, instance_host_info.

    timestamp

    Long

    Specifies when the event is reported. It is a UNIX timestamp and the unit is ms.

    value

    String

    Specifies 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 Value

    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 Codes

See Error Codes.