use crate::{MetricDescriptor, MetricName, MetricSubsystem, new_gauge_md};
use std::sync::LazyLock;
const SERVER_LABEL: &str = "server";
const DRIVE_LABEL: &str = "drive";
pub static NODE_DISK_TOTAL_BYTES_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_gauge_md(
MetricName::Custom("disk_total_bytes".to_string()),
"Total disk capacity in bytes",
&[SERVER_LABEL, DRIVE_LABEL],
MetricSubsystem::new("/node"),
)
});
pub static NODE_DISK_USED_BYTES_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_gauge_md(
MetricName::Custom("disk_used_bytes".to_string()),
"Used disk space in bytes",
&[SERVER_LABEL, DRIVE_LABEL],
MetricSubsystem::new("/node"),
)
});
pub static NODE_DISK_FREE_BYTES_MD: LazyLock<MetricDescriptor> = LazyLock::new(|| {
new_gauge_md(
MetricName::Custom("disk_free_bytes".to_string()),
"Free disk space in bytes",
&[SERVER_LABEL, DRIVE_LABEL],
MetricSubsystem::new("/node"),
)
});