Querying Job Monitoring Information

Function

This API is used to query job monitoring information. You can query monitoring information about multiple jobs at the same time.

URI

  • URI format

    POST /v1.0/{project_id}/jobs/metrics

  • Parameter description
    Table 1 URI parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

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

Request

The request parameter setting is in JSON format.

  • Example request
    {
        "job_ids": [298765, 298766]
    }
  • Parameter description
    Table 2 Request parameter

    Parameter

    Mandatory

    Type

    Description

    job_ids

    Yes

    Long array

    List of job IDs.

Response

  • Example response
    {
      "message_id": "CS.10001",
    "message": "Message content",
      "current_time": 40000000,
      "payload": {
        "jobs": [
          {
            "job_id": 0,
            "metrics": {
              "sources": [
                {
                  "name": "Source: KafKa_6070_KAFKA_SOURCE",
                  "records": 0,
                  "corrupted_records": 0
                }
              ],
              "sinks": [
                {
                  "name": "Source: KafKa_6070_KAFKA_SOURCE",
                  "records": 0,
                  "corrupted_records": 0
                }
              ],
              "total_read_rate": 100,
              "total_write_rate": 100
            }
          }
        ]
      }
    }
  • Parameter description
    Table 3 Response parameters

    Parameter

    Mandatory

    Type

    Description

    message_id

    No

    String

    Message type ID.

    message

    No

    String

    Message content.

    current_time

    No

    Int

    Current time, expressed by milliseconds.

    payload

    No

    None

    Job monitoring information.

    jobs

    No

    None

    Monitoring information about all jobs.

    job_id

    No

    Long

    Job ID.

    metrics

    No

    None

    All input and output monitoring information about a job.

    sources

    No

    None

    All source streams.

    sinks

    No

    None

    All sink streams.

    name

    No

    String

    Name of the source or sink stream.

    records

    No

    Long

    Total number of records.

    corrupted_records

    No

    Long

    Number of dirty data records.

    total_read_rate

    No

    Double

    Total read rate.

    total_write_rate

    No

    Double

    Total write rate.

Status Code

Table 4 Status code

Status Code

Description

200

The query of job monitoring information succeeds.

400

The input parameters are invalid.

Error Code

For details, see Error Codes.