feat: add container resource breakdown to monitoring
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:read permission. Docker container IDs are validated before running docker top, and the Cloud version keeps the same restricted behavior as the existing monitoring endpoints.
Checklist
Before submitting this PR, please make sure that:
- [x] You created a dedicated branch based on the
canarybranch. - [x] You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
- [x] You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.
Testing
- [x]
corepack pnpm --dir apps/dokploy exec vitest --config __test__/vitest.config.ts __test__/monitoring/container-resource-usage.test.ts --run - [x]
corepack 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.ts - [x]
corepack pnpm --filter=dokploy run typecheck - [x]
corepack pnpm --filter=server run typecheck - [x]
corepack pnpm --filter=dokploy run build-server - [x]
corepack pnpm --filter=dokploy run build-next - [x]
corepack pnpm --filter=server run build - [x] Tested locally at
http://localhost:3000/dashboard/monitoringwith the Resource Usage table expanded and container process drill-down verified.
Issues related (if applicable)
N/A
Screenshots (if applicable)

I need all this because I can’t figure out which container or which service is causing such heavy loads that my VPS is freezing. Therefore, I would like to see this moment, if I have any such loads and loads, I would like to receive a notification in Telegram that a certain container is starting to heavily load my VPS, that it stops responding to me.
Rebased on latest canary (439f57566) and re-verified locally after rebase.
Checks run:
corepack pnpm install --frozen-lockfilecorepack pnpm --filter=dokploy exec vitest run --config __test__/vitest.config.ts __test__/monitoring/container-resource-usage.test.tscorepack 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 @dokploy/server run typecheck
CI may remain in action_required until GitHub Actions is approved for this fork PR.
@Siumauricio this PR now has a linked feature request (#4653), was rebased on the latest canary, and was re-verified locally after rebase. Could you please review it when you have time and approve the GitHub Actions workflow run for this fork PR?
Any updates? I'm really looking forward to this change.
Any updates? I'm really looking forward to this change. @luanupe Bro, there's only one admin here and this repo has a ton of vulnerabilities. I'm currently fixing them in my fork, and I'll also add all the functionality that was suggested here. The admin is silent and barely crawling like a turtle. I consider myself doing work and want to rely on my own development because the admin doesn't devote enough time to this project. Apparently, he's only concerned about money and earning money from people, and he's not interested in security or improving the project - because I don't see a reason why he hasn't confirmed all my PRs yet.
Join me in co-developing and forking https://github.com/agentHits/dokploy/tree/AgentHits-Dev
This is so you understand what kind of work I'm doing on dokploy
I went through more than 50 pull requests, and it seems that around 60% of them are valid and worth reviewing. However, many of them don't receive any comments or response from the maintainers, so contributors have no idea whether their work will be accepted, needs changes, or has been rejected.
I think the project would benefit from expanding the maintainer/review team. Even a quick acknowledgment or review status would go a long way in keeping contributors engaged and preventing good PRs from being overlooked.
Я просмотрел более 50 запросов на вытягивание, и кажется, что около 60% из них действительны и заслуживают рассмотрения. Тем не менее, многие из них не получают никаких комментариев или ответов от сопровождающих, поэтому участники понятия не имеют, будет ли их работа принята, нуждается ли в изменениях или была отклонена.
Я думаю, что проект выиграет от расширения команды сопровождающих/рецензеров. Даже быстрое приведение или статус обзора во многом способствову позволит участникам быть вовлечены и предотвратить упущение из виду хороших PR.
You are absolutely right, development depends on one person, which is very sad - this person, as you say, does it in one hand and does not even give feedback, I am monitoring the project and only see that the number of PRs is increasing, but we are practically not moving forward - what the author is thinking about and how he plans, I do not understand his philosophy - but I clearly see that the project is deteriorating in security because many libraries are old and they need to be kept up to date - How much noise and hubbub there was about React Next JS and so on, and the developer does God knows what, updates the code in old libraries) So it is easier to update the entire project and migrate it to a modern Bun - and then fix all the bugs, this is a priority
Я просмотрел более 50 запросов на вытягивание, и кажется, что около 60% из них действительны и заслуживают рассмотрения. Тем не менее, многие из них не получают никаких комментариев или ответов от сопровождающих, поэтому участники понятия не имеют, будет ли их работа принята, нуждается ли в изменениях или была отклонена. Я думаю, что проект выиграет от расширения команды сопровождающих/рецензеров. Даже быстрое приведение или статус обзора во многом способствову позволит участникам быть вовлечены и предотвратить упущение из виду хороших PR.
You are absolutely right, development depends on one person, which is very sad - this person, as you say, does it in one hand and does not even give feedback, I am monitoring the project and only see that the number of PRs is increasing, but we are practically not moving forward - what the author is thinking about and how he plans, I do not understand his philosophy - but I clearly see that the project is deteriorating in security because many libraries are old and they need to be kept up to date - How much noise and hubbub there was about React Next JS and so on, and the developer does God knows what, updates the code in old libraries) So it is easier to update the entire project and migrate it to a modern Bun - and then fix all the bugs, this is a priority
Let's continue this discussion in the GitHub Discussion instead of the PR comments, join the conversation here: #4803.