[pdm-devel] [RFC datacenter-manager 2/5] pdm-api-types: extend datastore resources by optional estimated full
Christian Ebner
c.ebner at proxmox.com
Mon Oct 27 15:25:48 CET 2025
Collect the estimated full date so it can be used to count and filter
for datastores with a disk usage uptrend, estimated to be full within
the next 7 days, and therefore might need closer monitoring or
intervention.
Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
lib/pdm-api-types/src/resource.rs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/pdm-api-types/src/resource.rs b/lib/pdm-api-types/src/resource.rs
index def8500..10ea123 100644
--- a/lib/pdm-api-types/src/resource.rs
+++ b/lib/pdm-api-types/src/resource.rs
@@ -9,6 +9,8 @@ use super::remotes::{RemoteType, REMOTE_ID_SCHEMA};
/// Critical PBS datastore usage threshold
pub const PBS_DATASTORE_CRITICAL_USAGE_THRESHOLD: f64 = 0.95;
+/// PBS datastore fillup regression threshold (1 week as secs)
+pub const PBS_DATASTORE_FILLUP_THRESHOLD: u64 = 7 * 24 * 60 * 60;
#[api(
"id-property": "id",
@@ -508,6 +510,9 @@ pub struct PbsDatastoreResource {
/// Datastore backend type
#[serde(skip_serializing_if = "Option::is_none")]
pub backend_type: Option<String>,
+ /// Datastore estimated full date (unix epoch)
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub estimated_full_date: Option<i64>,
}
#[api(
@@ -585,6 +590,9 @@ pub struct PbsDatastoreStatusCount {
/// Amount of datastores which have critical datastore usage
#[serde(skip_serializing_if = "Option::is_none")]
pub critical_usage: Option<u64>,
+ /// Amount of datastores with an upwards usage trend
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub uptrending_usage: Option<u64>,
/// Amount of datastores in unknown state
#[serde(skip_serializing_if = "Option::is_none")]
pub unknown: Option<u64>,
--
2.47.3
More information about the pdm-devel
mailing list