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