QueryLastObTask

2025-01-02 01:58:40  Updated

This API is used to query the last cluster O&M task in an OceanBase cluster.

Call description

Request path

GET /api/v1/task/dag/maintain/ob

Response parameters

Parameter Type Description
successful Boolean Indicates whether the request is successful.
timestamp Datetime The timestamp when the server completed the request.
duration Integer The amount of time taken by the server to process the request, in milliseconds.
status Integer The HTTP status code.
traceId String The trace ID of the request.
data Object For more information, see GetDagDetails.
error Object The information about the error that occurred.

Examples

Sample request

GET xxx.xxx.xxx.xxx:2886/api/v1/task/dag/maintain/ob

Sample response

{
    "successful": true,
    "timestamp": "2024-01-09T21:51:08.578629584+08:00",
    "duration": 226,
    "status": 200,
    "traceId": "efbf77556046d332",
    "data": {
        "id": "11",
        "dag_id": 1,
        "name": "Cluster scale out",
        "stage": 9,
        "max_stage": 9,
        "state": "SUCCEED",
        "operator": "RUN",
        "start_time": "2024-01-09T20:40:01.706073+08:00",
        "end_time": "2024-01-09T20:40:30.319822+08:00",
        "additional_data": {},
        "nodes": [
            {
                "id": "11",
                "node_id": 1,
                "name": "Integrate server config",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:01.718882+08:00",
                "end_time": "2024-01-09T20:40:02.751743+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "11",
                        "task_id": 1,
                        "name": "Integrate server config",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:01.74723+08:00",
                        "end_time": "2024-01-09T20:40:01.76717+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": []
                    }
                ]
            },
            {
                "id": "12",
                "node_id": 2,
                "name": "Create local scale out dag",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:03.77982+08:00",
                "end_time": "2024-01-09T20:40:04.805204+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "12",
                        "task_id": 2,
                        "name": "Create local scale out dag",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:03.796683+08:00",
                        "end_time": "2024-01-09T20:40:03.836712+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "create local scale out dag success, genericID:22130706433028869"
                        ]
                    }
                ]
            },
            {
                "id": "13",
                "node_id": 3,
                "name": "Wait scale out ready",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:05.828194+08:00",
                "end_time": "2024-01-09T20:40:06.85324+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "13",
                        "task_id": 3,
                        "name": "Wait scale out ready",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:05.845011+08:00",
                        "end_time": "2024-01-09T20:40:05.861857+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "local scale out dag task Be scaling agent is succeed"
                        ]
                    }
                ]
            },
            {
                "id": "14",
                "node_id": 4,
                "name": "Wait remote deploy finish",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:07.876596+08:00",
                "end_time": "2024-01-09T20:40:13.968817+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "14",
                        "task_id": 4,
                        "name": "Wait remote deploy finish",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:07.894515+08:00",
                        "end_time": "2024-01-09T20:40:13.950807+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "retry stage: 2 successfully",
                            "remote deploy task is succeed"
                        ]
                    }
                ]
            },
            {
                "id": "15",
                "node_id": 5,
                "name": "Wait remote start finish",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:14.996088+08:00",
                "end_time": "2024-01-09T20:40:21.091862+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "15",
                        "task_id": 5,
                        "name": "Wait remote start finish",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:15.016+08:00",
                        "end_time": "2024-01-09T20:40:21.079217+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "retry stage: 4 successfully",
                            "remote start observer task is succeed"
                        ]
                    }
                ]
            },
            {
                "id": "16",
                "node_id": 6,
                "name": "Prev check for scale_out",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:22.115167+08:00",
                "end_time": "2024-01-09T20:40:23.142216+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "16",
                        "task_id": 6,
                        "name": "Prev check for scale_out",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:22.134063+08:00",
                        "end_time": "2024-01-09T20:40:22.148848+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "PrevCheckTask execute"
                        ]
                    }
                ]
            },
            {
                "id": "17",
                "node_id": 7,
                "name": "Add server for scale_out",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:24.167045+08:00",
                "end_time": "2024-01-09T20:40:25.194054+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "17",
                        "task_id": 7,
                        "name": "Add server for scale_out",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:24.186025+08:00",
                        "end_time": "2024-01-09T20:40:24.21232+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "AddServerTask execute"
                        ]
                    }
                ]
            },
            {
                "id": "18",
                "node_id": 8,
                "name": "Add agent  for scale_out",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:26.219246+08:00",
                "end_time": "2024-01-09T20:40:27.247243+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "18",
                        "task_id": 8,
                        "name": "Add agent  for scale_out",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:26.238089+08:00",
                        "end_time": "2024-01-09T20:40:26.252762+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": []
                    }
                ]
            },
            {
                "id": "19",
                "node_id": 9,
                "name": "Check cluster scale_out whether finished",
                "state": "SUCCEED",
                "operator": "RUN",
                "start_time": "2024-01-09T20:40:28.275457+08:00",
                "end_time": "2024-01-09T20:40:30.315618+08:00",
                "additional_data": null,
                "sub_tasks": [
                    {
                        "id": "19",
                        "task_id": 9,
                        "name": "Check cluster scale_out whether finished",
                        "state": "SUCCEED",
                        "operator": "RUN",
                        "start_time": "2024-01-09T20:40:28.293296+08:00",
                        "end_time": "2024-01-09T20:40:30.308244+08:00",
                        "additional_data": null,
                        "execute_times": 1,
                        "execute_agent": {
                            "ip": "xxx.xxx.xxx.xxx",
                            "port": 2886
                        },
                        "task_logs": [
                            "FinishTask execute"
                        ]
                    }
                ]
            }
        ]
    }
}

The sample response displays the details of a DAG task named Cluster scale out. The operation type is RUN, and the execution result is SUCCEED.

Contact Us