PumpIP is the ip of the Pump server. 8250 is the default port of Pump.
-
Get the current status of Pump instances
curl http://{PumpIP}:8250/status$curl http://127.0.0.1:8250/status { "status":{ "ip-172-16-5-71:8250":{ "nodeId":"ip-172-16-5-71:8250", "host":"172.16.5.71:8250", "state":"online", "isAlive":false, "score":0, "label":null, "maxCommitTS":412518831548007863, "updateTS":412518831338292471 }, "ip-172-16-5-74:8250":{ "nodeId":"ip-172-16-5-74:8250", "host":"172.16.5.74:8250", "state":"online", "isAlive":false, "score":0, "label":null, "maxCommitTS":412518831548007869, "updateTS":412518831325184860 }, "ip-172-16-5-75:8250":{ "nodeId":"ip-172-16-5-75:8250", "host":"172.16.5.75:8250", "state":"online", "isAlive":false, "score":0, "label":null, "maxCommitTS":412518831548007875, "updateTS":412518831534899704 } }, "CommitTS":412518831849473230, "Checkpoint":{ }, "ErrMsg":"" }
-
Get all metrics of Pump
curl http://{PumpIP}:8250/metrics -
Get the status of all drainers
curl http://{PumpIP}:8250/drainers$curl http://127.0.0.1:8250/drainers [ { "nodeId":"ip-172-16-5-70:8249", "host":"172.16.5.70:8249", "state":"paused", "isAlive":false, "score":0, "label":null, "maxCommitTS":412361808537191540, "updateTS":412518474704487076 } ]
-
Change the Pump status
NodeIDis the node id of the Pump server.Actionis the action to execute[possible values:pause,close].pauseis equivalent topause-pumpin binlogctl,closeis equivalent tooffline-pumpin binlogctl.curl -X PUT http://{PumpIP}:8250/state/{NodeID}/{Action}$curl -X PUT http://127.0.0.1:8250/state/ip-172-16-5-71:8250/stop { "message":"apply action stop success!", "code":200 }
-
Get the binlog by TS
curl http://{PumpIP}:8250/debug/binlog/{ts}$curl http://127.0.0.1:8250/debug/binlog/412518831548007863 tp:Commit start_ts:412518831548007786 commit_ts:412518831548007863 prewrite_key:"t\200\000\000\000\000\000-\212_i\200\000\000\000\000\000\000\001\003\200\000\000\000\000\teK\003\200\000\000\000\000\007\230L" GetMvccByEncodedKey:
-
Start the GC
curl -X POST http://{PumpIP}:8250/debug/gc/trigger
DrainerIP is the ip of the Drainer server. 8249 is the default port of Drainer.
-
Get the current status of Drainer
curl http://{DrainerIP}:8249/status$curl http://127.0.0.1:8249/status { "PumpPos":{ "ip-172-16-5-71:8250":412361808550297954, "ip-172-16-5-74:8250":412361808550297951, "ip-172-16-5-75:8250":412361808550297952 }, "Synced":true, "LastTS":412361808537191540, "TsMap":"" }
-
Get all metrics of Drainer
curl http://{DrainerIP}:8249/metrics -
Get the lastest commit ts of Drainer
curl http://{DrainerIP}:8249/commit_tscurl http://{DrainerIP}:8249/commit_ts { "message": "get drainer's latest ts success!", "code": 200, "data": { "ts": 412361808537191540 } } -
Change the Drainer status
NodeIDis the node id of the Drainer server.Actionis the action to execute[possible values:pause,close].pauseis equivalent topause-drainerin binlogctl,closeis equivalent tooffline-drainerin binlogctl.curl -X PUT http://{DrainerIP}:8249/state/{NodeID}/{Action}$curl -X PUT http://127.0.0.1:8249/state/ip-172-16-5-70:8249/stop { "message":"apply action stop success!", "code":200 }