Show Meta Info Action

Request

GET /api/show_meta_info

Description

Used to display some metadata information

Path parameters

Query parameters

  • action

    Specify the type of metadata information to be obtained. Currently supports the following:

    • SHOW_DB_SIZE

      Get the data size of the specified database, in bytes.

    • SHOW_HA

      Obtain the playback status of FE metadata logs and the status of electable groups.

Request body

None

Response

  • SHOW_DB_SIZE

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "default_cluster:information_schema": 0,
    6. "default_cluster:db1": 381
    7. },
    8. "count": 0
    9. }
  • SHOW_HA

    1. {
    2. "msg": "success",
    3. "code": 0,
    4. "data": {
    5. "can_read": "true",
    6. "role": "MASTER",
    7. "is_ready": "true",
    8. "last_checkpoint_version": "1492",
    9. "last_checkpoint_time": "1596465109000",
    10. "current_journal_id": "1595",
    11. "electable_nodes": "",
    12. "observer_nodes": "",
    13. "master": "10.81.85.89"
    14. },
    15. "count": 0
    16. }

Examples

  1. View the data size of each database in the cluster

    1. GET /api/show_meta_info?action=show_db_size
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "default_cluster:information_schema": 0,
    8. "default_cluster:db1": 381
    9. },
    10. "count": 0
    11. }
  2. View the FE election group situation

    1. GET /api/show_meta_info?action=show_ha
    2. Response:
    3. {
    4. "msg": "success",
    5. "code": 0,
    6. "data": {
    7. "can_read": "true",
    8. "role": "MASTER",
    9. "is_ready": "true",
    10. "last_checkpoint_version": "1492",
    11. "last_checkpoint_time": "1596465109000",
    12. "current_journal_id": "1595",
    13. "electable_nodes": "",
    14. "observer_nodes": "",
    15. "master": "10.81.85.89"
    16. },
    17. "count": 0
    18. }