From 3cb201d7663cb9c3134fc3670bd6b83184fd7f9e Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Fri, 27 Mar 2026 18:58:35 -0400 Subject: [PATCH] Fix statistics graphPayloads never being populated and add redesigned telemetry partial Made-with: Cursor --- .../Servers/Proxmox/Livewire/Statistics.php | 7 +- .../views/partials/telemetry-charts.blade.php | 311 ++++++++++++++++++ 2 files changed, 316 insertions(+), 2 deletions(-) create mode 100644 extensions/Servers/Proxmox/views/partials/telemetry-charts.blade.php diff --git a/extensions/Servers/Proxmox/Livewire/Statistics.php b/extensions/Servers/Proxmox/Livewire/Statistics.php index f79687de8..6c5244a9c 100644 --- a/extensions/Servers/Proxmox/Livewire/Statistics.php +++ b/extensions/Servers/Proxmox/Livewire/Statistics.php @@ -906,7 +906,8 @@ class Statistics extends Component // Reduced cache TTL from 60 to 30 seconds for fresher data and faster updates $data = Cache::remember($cacheKey, 30, function () use ($timeRange, $aggregation) { $proxmox = new Proxmox; - $stats = $proxmox->request('/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/rrddata', data: [ + $vmType = $this->server->node->vmType(); + $stats = $proxmox->request('/nodes/' . $this->server->node->name . '/' . $vmType . '/' . $this->server->vm_id . '/rrddata', data: [ 'timeframe' => $timeRange, 'cf' => $aggregation === 'maximum' ? 'MAX' : 'AVERAGE', ]); @@ -938,7 +939,9 @@ class Statistics extends Component $data = []; } - $this->dispatch('proxmox:stats:' . $this->server->id . ':' . $graphType, $data); + $this->graphPayloads[$graphType] = is_array($data) ? $data : []; + + $this->dispatch('proxmox:stats:' . $this->server->id . ':' . $graphType, $this->graphPayloads[$graphType]); } #[On('render-chart-events')] diff --git a/extensions/Servers/Proxmox/views/partials/telemetry-charts.blade.php b/extensions/Servers/Proxmox/views/partials/telemetry-charts.blade.php new file mode 100644 index 000000000..7269f7719 --- /dev/null +++ b/extensions/Servers/Proxmox/views/partials/telemetry-charts.blade.php @@ -0,0 +1,311 @@ +{{-- Live telemetry: ApexCharts targets (#cpu-chart, etc.) + wire bindings must stay stable for @script initializers --}} + +
+
+
+
+ Loading telemetry… +
+
+ +
+
+
+
+ + + +

Live telemetry

+
+

+ RRD-backed series from your hypervisor: CPU, memory, network (with 95th percentile), and disk I/O. + Adjust range and aggregation per chart; data refreshes every two minutes and when you change filters. +

+
+
+ + Polls VM status with the page header; graph series use Proxmox rrddata. +
+
+ +
+ {{-- CPU --}} +
+
+
+ + + +
+

Processor

+

Utilization (%)

+
+
+
+ + + +
+
+
+ About this chart +

CPU from RRD as a share of allocated cores (shown as percent). Export includes timestamps and values.

+
+
+
+
+ Preparing chart… +
+
+
+
+
+ + {{-- Network --}} +
+
+
+ + + +
+

Network

+

Throughput + 95th percentile

+
+
+
+ + + +
+
+
+ About this chart +

Inbound and outbound rates plus a dashed 95th percentile of combined traffic (common for capacity planning).

+
+
+
+
+ Preparing chart… +
+
+
+
+
+ + {{-- Memory --}} +
+
+
+ + + +
+

Memory

+

Guest RAM (bytes)

+
+
+
+ + + +
+
+
+ About this chart +

Uses Proxmox RRD mem with axis capped by current VM max memory when available.

+
+
+
+
+ Preparing chart… +
+
+
+
+
+ + {{-- Disk --}} +
+
+
+ + + +
+

Disk I/O

+

Read / write rates

+
+
+
+ + + +
+
+
+ About this chart +

Disk read and write bytes per second from RRD. Pair with task history when investigating spikes.

+
+
+
+
+ Preparing chart… +
+
+
+
+
+
+
+