* [pdm-devel] [PATCH datacenter-manager] server: metric collection: include pbs nodes in top-entities
@ 2025-09-30 10:06 Dominik Csapak
2025-10-07 15:01 ` Shan Shaji
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2025-09-30 10:06 UTC (permalink / raw)
To: pdm-devel
they have the identical data-points (cpu_current, mem_used, mem_total)
necessary to be included, so let's do so.
Since PBS node metrics are not saved with the nodename in the path, but
rather 'host', we have to special case that here when getting the rrd
data.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
server/src/metric_collection/top_entities.rs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/server/src/metric_collection/top_entities.rs b/server/src/metric_collection/top_entities.rs
index 47fda24c..80f98966 100644
--- a/server/src/metric_collection/top_entities.rs
+++ b/server/src/metric_collection/top_entities.rs
@@ -41,7 +41,7 @@ pub fn calculate_top(
let mut node_cpu = Vec::new();
let mut node_memory = Vec::new();
- for remote_name in remotes.keys() {
+ for (remote_name, remote) in remotes {
if let Some(data) =
crate::api::resources::get_cached_resources(remote_name, i64::MAX as u64)
{
@@ -58,7 +58,13 @@ pub fn calculate_top(
insert_sorted(&mut guest_cpu, (coefficient, entity.1), num);
}
}
- Resource::PveNode(_) => {
+ Resource::PveNode(_) | Resource::PbsNode(_) => {
+ // pbs node datapoints are always saved with 'host' instead of nodename
+ let name = if remote.ty == pdm_api_types::remotes::RemoteType::Pbs {
+ format!("pbs/{remote_name}/host")
+ } else {
+ name
+ };
if let Some(entity) = get_entity(
timeframe,
remote_name,
@@ -101,7 +107,6 @@ pub fn calculate_top(
}
}
Resource::PveSdn(_) => {}
- Resource::PbsNode(_) => {}
Resource::PbsDatastore(_) => {}
}
}
--
2.47.3
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pdm-devel] [PATCH datacenter-manager] server: metric collection: include pbs nodes in top-entities
2025-09-30 10:06 [pdm-devel] [PATCH datacenter-manager] server: metric collection: include pbs nodes in top-entities Dominik Csapak
@ 2025-10-07 15:01 ` Shan Shaji
0 siblings, 0 replies; 2+ messages in thread
From: Shan Shaji @ 2025-10-07 15:01 UTC (permalink / raw)
To: Proxmox Datacenter Manager development discussion; +Cc: pdm-devel
Applied this patch and tested the following:
- Added a backup server through the PDM UI.
- The backup server was visible under the "Nodes with highest CPU Usage"
panel and the "Nodes with Highest Memory usage" panel.
Note: One small thing that i noticed is that when i added the
backup server, it was immediately visible under the remotes
configuration. However, on the dashboard, the backup server
did not appear under the panels when i clicked on the dashoard
menu. Had to refresh the browser to see the updated panels.
So i tried adding it again and this time i didn't refresh the browser
waited for automatic refresh to happen. After the automatic refresh,
the data was visible in the panels, so i think it's fine.
Tested-by: Shan Shaji <s.shaji@proxmox.com>
_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-07 15:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-30 10:06 [pdm-devel] [PATCH datacenter-manager] server: metric collection: include pbs nodes in top-entities Dominik Csapak
2025-10-07 15:01 ` Shan Shaji
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.