RUNTIME_METRICS

The RUNTIME_METRICS table provides system runtime metrics. It includes all metrics from the /metrics HTTP endpoint output in the cluster.

  1. USE INFORMATION_SCHEMA;
  2. SELECT * FROM RUNTIME_METRICS;

Sample output is as follows:

  1. +------------------------------------------------------+------------------------+--------------------------------------------------------+---------+-----------+----------------------------+
  2. | metric_name | value | labels | node | node_type | timestamp |
  3. +------------------------------------------------------+------------------------+--------------------------------------------------------+---------+-----------+----------------------------+
  4. | greptime_app_version | 1 | short_version=0.7.1, version=greptimedb-main-92a8e86 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  5. | greptime_catalog_catalog_count | 1 | | unknown | unknown | 2024-03-27 22:43:12.898000 |
  6. | greptime_catalog_schema_count | 2 | | unknown | unknown | 2024-03-27 22:43:12.898000 |
  7. | greptime_meta_create_catalog_bucket | 1 | le=0.005 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  8. | greptime_meta_create_catalog_bucket | 1 | le=0.01 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  9. | greptime_meta_create_catalog_bucket | 1 | le=0.025 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  10. | greptime_meta_create_catalog_bucket | 1 | le=0.05 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  11. | greptime_meta_create_catalog_bucket | 1 | le=0.1 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  12. | greptime_meta_create_catalog_bucket | 1 | le=0.25 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  13. | greptime_meta_create_catalog_bucket | 1 | le=0.5 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  14. | greptime_meta_create_catalog_bucket | 1 | le=1 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  15. | greptime_meta_create_catalog_bucket | 1 | le=2.5 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  16. | greptime_meta_create_catalog_bucket | 1 | le=5 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  17. | greptime_meta_create_catalog_bucket | 1 | le=10 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  18. | greptime_meta_create_catalog_bucket | 1 | le=+Inf | unknown | unknown | 2024-03-27 22:43:12.898000 |
  19. | greptime_meta_create_catalog_sum | 0.000290333 | | unknown | unknown | 2024-03-27 22:43:12.898000 |
  20. | greptime_meta_create_catalog_count | 1 | | unknown | unknown | 2024-03-27 22:43:12.898000 |
  21. | greptime_meta_create_catalog_counter | 1 | | unknown | unknown | 2024-03-27 22:43:12.898000 |
  22. | greptime_meta_create_schema_bucket | 3 | le=0.005 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  23. | greptime_meta_create_schema_bucket | 3 | le=0.01 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  24. | greptime_meta_create_schema_bucket | 3 | le=0.025 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  25. | greptime_meta_create_schema_bucket | 3 | le=0.05 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  26. | greptime_meta_create_schema_bucket | 3 | le=0.1 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  27. | greptime_meta_create_schema_bucket | 3 | le=0.25 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  28. | greptime_meta_create_schema_bucket | 3 | le=0.5 | unknown | unknown | 2024-03-27 22:43:12.898000 |
  29. ...

The columns in the output:

  • metric_name: the metric name.
  • value: the metric value.
  • labels: the metric labels and values, separated by ,.
  • node: the metric which peer it comes from
  • node_type: the peer type, such as datanode, frontend etc.
  • timestamp: the metric timestamp