feat: add container resource breakdown to monitoring#4571
Open
agentHits wants to merge 1 commit into
Open
Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What is this PR about?
This PR adds a self-hosted Resource Usage breakdown to the Monitoring page. It shows the current CPU, memory, disk size, disk I/O, and network I/O usage per running Docker container, and lets users expand a container row to inspect its top processes by CPU/memory usage.
The feature is only exposed for the Dokploy container monitoring view and reuses the existing
monitoring:readpermission. Docker container IDs are validated before runningdocker top, and the Cloud version keeps the same restricted behavior as the existing monitoring endpoints.Checklist
Before submitting this PR, please make sure that:
canarybranch.Testing
corepack pnpm --dir apps/dokploy exec vitest --config __test__/vitest.config.ts __test__/monitoring/container-resource-usage.test.ts --runcorepack pnpm exec biome check apps/dokploy/__test__/monitoring/container-resource-usage.test.ts apps/dokploy/components/dashboard/monitoring/container-resource-usage/container-resource-usage.tsx apps/dokploy/components/dashboard/monitoring/container-resource-usage/utils.ts apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx apps/dokploy/server/api/routers/server.ts packages/server/src/services/docker.tscorepack pnpm --filter=dokploy run typecheckcorepack pnpm --filter=server run typecheckcorepack pnpm --filter=dokploy run build-servercorepack pnpm --filter=dokploy run build-nextcorepack pnpm --filter=server run buildhttp://localhost:3000/dashboard/monitoringwith the Resource Usage table expanded and container process drill-down verified.Issues related (if applicable)
N/A
Screenshots (if applicable)