Feature Description
Add a real-time system resource metrics widget to the sidebar, giving users at-a-glance visibility into host resource usage without leaving the Portainer UI.
Motivation
Currently there is no way to monitor host resource usage (CPU, RAM, Disk) directly from the Portainer sidebar. Users have to leave the UI or open a separate tool to check system health. This feature improves operational awareness, especially for self-hosted users managing resource-constrained environments.
Proposed Solution
Display three resource bars (CPU, RAM, Disk) and a Disk I/O row in the sidebar, updated every 5 seconds:
- CPU — usage percentage + number of logical cores
- RAM — usage percentage + used/total (e.g.
4.2 GB / 16.0 GB)
- Disk — usage percentage + used/total (e.g.
200 GB / 476 GB)
- Disk I/O — read and write throughput in bytes/s (e.g.
↓ 1.2 MB/s ↑ 300 KB/s)
Metrics are collected server-side using gopsutil via a new /api/system/metrics endpoint (authenticated).
Implementation Overview
Backend
- New handler
GET /api/system/metrics returning CPU %, core count, RAM used/total, Disk used/total, Disk I/O read/write bytes/s
- Uses
github.com/shirou/gopsutil/v3
Frontend
- New
ResourceCharts component rendered in the sidebar when open
- Polls
/api/system/metrics every 5s via React Query
Alternatives Considered
- Pulling metrics from Docker stats — limited to container scope, doesn't reflect host disk or full RAM
- Client-side metrics via browser APIs — not available for server-side resources
Related PR
#13159
Feature Description
Add a real-time system resource metrics widget to the sidebar, giving users at-a-glance visibility into host resource usage without leaving the Portainer UI.
Motivation
Currently there is no way to monitor host resource usage (CPU, RAM, Disk) directly from the Portainer sidebar. Users have to leave the UI or open a separate tool to check system health. This feature improves operational awareness, especially for self-hosted users managing resource-constrained environments.
Proposed Solution
Display three resource bars (CPU, RAM, Disk) and a Disk I/O row in the sidebar, updated every 5 seconds:
4.2 GB / 16.0 GB)200 GB / 476 GB)↓ 1.2 MB/s ↑ 300 KB/s)Metrics are collected server-side using gopsutil via a new
/api/system/metricsendpoint (authenticated).Implementation Overview
Backend
GET /api/system/metricsreturning CPU %, core count, RAM used/total, Disk used/total, Disk I/O read/write bytes/sgithub.com/shirou/gopsutil/v3Frontend
ResourceChartscomponent rendered in the sidebar when open/api/system/metricsevery 5s via React QueryAlternatives Considered
Related PR
#13159