TiDBIP
is the ip of the TiDB server. 10080
is the default status port, and you can edit it in tidb.toml when starting the TiDB server.
-
Get the current status of TiDB, including the connections, version and git_hash
curl http://{TiDBIP}:10080/status
-
Get all metrics of TiDB
curl http://{TiDBIP}:10080/metrics
-
Get the metadata of all regions
curl http://{TiDBIP}:10080/regions/meta
-
Get the information of a specific region by ID
curl http://{TiDBIP}:10080/regions/{regionID}
-
Get regions Information from db.table
curl http://{TiDBIP}:10080/tables/{db}/{table}/regions
-
Get schema Information about all db
curl http://{TiDBIP}:10080/schema
-
Get schema Information about db
curl http://{TiDBIP}:10080/schema/{db}
-
Get schema Information about db.table, and you can get schema info by tableID (tableID is the unique identifier of table in TiDB)
curl http://{TiDBIP}:10080/schema/{db}/{table} curl http://{TiDBIP}:10080/schema?table_id={tableID}
-
Get disk-usage info about db.table
curl http://{TiDBIP}:10080/tables/{db}/{table}/disk-usage
-
Get MVCC Information of the key with a specified handle ID
curl http://{TiDBIP}:10080/mvcc/key/{db}/{table}/{handle}
-
Get MVCC Information of the first key in the table with a specified start ts
curl http://{TiDBIP}:10080/mvcc/txn/{startTS}/{db}/{table}
-
Get MVCC Information by a hex value
curl http://{TiDBIP}:10080/mvcc/hex/{hexKey}
-
Get MVCC Information of a specified index key, argument example: column_name_1=column_value_1&column_name_2=column_value2...
curl http://{TiDBIP}:10080/mvcc/index/{db}/{table}/{index}/{handle}?${c1}={v1}&${c2}=${v2}
Hint: For the index column which column type is timezone dependent, e.g.
timestamp
, convert its value to UTC timezone. -
Get TiDB server settings
curl http://{TiDBIP}:10080/settings
-
Get TiDB server information.
curl http://{TiDBIP}:10080/info
-
Get TiDB cluster all servers information.
curl http://{TiDBIP}:10080/info/all
-
Enable/Disable TiDB server general log
curl -X POST -d "tidb_general_log=1" http://{TiDBIP}:10080/settings curl -X POST -d "tidb_general_log=0" http://{TiDBIP}:10080/settings
-
Change TiDB server log level
curl -X POST -d "log_level=debug" http://{TiDBIP}:10080/settings curl -X POST -d "log_level=info" http://{TiDBIP}:10080/settings
-
Change TiDB DDL slow log threshold
The unit is millisecond.
curl -X POST -d "ddl_slow_threshold=300" http://{TiDBIP}:10080/settings
-
Get the column value by an encoded row and some information that can be obtained from a column of the table schema information.
Argument example: rowBin=base64_encoded_row_value
curl http://{TiDBIP}:10080/tables/{colID}/{colFlag}/{colLen}?rowBin={val}
Hint: For the column which field type is timezone dependent, e.g.
timestamp
, convert its value to UTC timezone. -
Resign the ddl owner, let tidb start a new ddl owner election.
curl -X POST http://{TiDBIP}:10080/ddl/owner/resign
Note: If you request a tidb that is not ddl owner, the response will be
This node is not a ddl owner, can't be resigned.