1use lazy_static::lazy_static;
16use prometheus::*;
17
18lazy_static! {
19 pub static ref METRIC_CATALOG_MANAGER_CATALOG_COUNT: IntGauge =
20 register_int_gauge!("greptime_catalog_catalog_count", "catalog catalog count").unwrap();
21 pub static ref METRIC_CATALOG_MANAGER_SCHEMA_COUNT: IntGauge =
22 register_int_gauge!("greptime_catalog_schema_count", "catalog schema count").unwrap();
23 pub static ref METRIC_CATALOG_MANAGER_TABLE_COUNT: IntGaugeVec = register_int_gauge_vec!(
24 "greptime_catalog_table_count",
25 "catalog table count",
26 &["db"]
27 )
28 .unwrap();
29 pub static ref METRIC_CATALOG_KV_REMOTE_GET: Histogram =
30 register_histogram!("greptime_catalog_kv_get_remote", "catalog kv get remote").unwrap();
31 pub static ref METRIC_CATALOG_KV_GET: Histogram =
32 register_histogram!("greptime_catalog_kv_get", "catalog kv get").unwrap();
33 pub static ref METRIC_CATALOG_KV_BATCH_GET: Histogram =
34 register_histogram!("greptime_catalog_kv_batch_get", "catalog kv batch get").unwrap();
35
36 pub static ref PROCESS_LIST_COUNT: IntGaugeVec = register_int_gauge_vec!(
38 "greptime_process_list_count",
39 "Running process count per catalog",
40 &["catalog"]
41 )
42 .unwrap();
43
44 pub static ref PROCESS_KILL_COUNT: IntCounterVec = register_int_counter_vec!(
46 "greptime_process_kill_count",
47 "Completed kill process requests count",
48 &["catalog"]
49 )
50 .unwrap();
51}