RUNTIME_METRICS

RUNTIME_METRICS表提供系统运行时指标。它包括集群中/metrics HTTP端点输出的所有指标。

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

结果如下:

  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. ...

结果中的列:

  • metric_name:指标名称。
  • value:指标值。
  • labels:指标标签和值,用,分隔。
  • node: 指标来自哪个节点
  • node_type:节点类型,如datanodefrontend等。
  • timestamp:指标时间戳