Skip to content

[Feature] Real-Time Graphical Resource Monitoring (CPU/RAM/Network) per Container and Compose Group #34

@IT-WIBRC

Description

@IT-WIBRC

Implement a real-time graphical dashboard to visualize resource usage (CPU, Memory, Network I/O) for managed containers, providing both per-container views and consolidated views grouped by Docker Compose project.

Motivation and Use Cases

As developers, we frequently need to diagnose performance bottlenecks and resource leaks in our applications. While docker stats provides raw numbers, an integrated graphical view is much more intuitive and efficient.

Key Use Cases:

  • Performance Debugging: Quickly identify spikes in CPU or memory that correspond to specific application events.
  • Resource Allocation: Visually confirm that containers are running within their allocated resource limits (if defined).
  • Service Health: Monitor long-term resource trends to spot potential memory leaks or stability issues before they become critical.
  • Compose Grouping: Easily compare resource usage across different services within a single Compose application.

Proposed Solution and Visualization**

Introduce a new "Monitoring" or "Statistics" view that displays the following data points as line graphs over time:

  1. CPU Usage: Percentage of host or defined limit used.
  2. Memory Usage: Absolute amount and percentage of limit used.
  3. Network I/O: Real-time data transmission (RX/TX) rates.

Grouping: The view should offer a toggle or filter to switch between:

  • All Containers: A list or grid of graphs for every running container.
  • Grouped by Compose Project: A main dashboard showing aggregate CPU/RAM usage for a Compose project, with the ability to click and view individual services within that group (similar to how htop groups processes).

🛠️ Technical Details / Implementation Approach

The core data should be gathered via the Docker Engine API, specifically using the endpoint that streams container resource usage statistics (similar to how docker stats is implemented).

  • Data Source: Stream data from the /containers/{id}/stats endpoint.
  • Visualization: Utilize a modern charting library (e.g., Chart.js, Recharts, or Plotly, depending on the current framework) to render the real-time data efficiently.
  • Data Retention: For real-time monitoring, data retention could be limited to the last 5-10 minutes of activity shown on the graph, reducing memory load on the dokemon application itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions