From: Christian Ebner <c.ebner@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [RFC datacenter-manager 2/5] pdm-api-types: extend datastore resources by optional estimated full
Date: Mon, 27 Oct 2025 15:25:48 +0100 [thread overview]
Message-ID: <20251027142551.458160-3-c.ebner@proxmox.com> (raw)
In-Reply-To: <20251027142551.458160-1-c.ebner@proxmox.com>
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@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
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
next prev parent reply other threads:[~2025-10-27 14:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 14:25 [pdm-devel] [RFC datacenter-manager 0/5] show uptrending datastores in dashboard panel Christian Ebner
2025-10-27 14:25 ` [pdm-devel] [RFC datacenter-manager 1/5] pdm-api-types/ui/resources: rename and bump PBS datastore high-usage Christian Ebner
2025-10-27 14:25 ` Christian Ebner [this message]
2025-10-27 14:25 ` [pdm-devel] [RFC datacenter-manager 3/5] server: resources: account for datastores with upwards usage trend Christian Ebner
2025-10-27 14:25 ` [pdm-devel] [RFC datacenter-manager 4/5] ui: dashboard: show datastores with upwards trend in stats panel Christian Ebner
2025-10-27 14:25 ` [pdm-devel] [RFC datacenter-manager 5/5] pdm-api-types: calculate upwards trending datastore usage property Christian Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251027142551.458160-3-c.ebner@proxmox.com \
--to=c.ebner@proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox