Application Monitor Problem
To Reproduce
The container of type application cannot view the monitoring data because the format of the container's name is: {appName}.{version}.xxxxx. However, user.getContainerMetrics directly uses appName to query remote monitor server.
The monitor server directly uses appName to query in SQLite, so no data can be found.
https://github.com/Dokploy/dokploy/blob/5c915bc1b98f43db936f5478bf0d950e84f33893/apps/monitoring/database/containers.go#L51
Current vs. Expected behavior
The container of type application cannot view the monitoring data because the format of the container's name is: {appName}.{version}.xxxxx. However, user.getContainerMetrics directly uses appName to query.
Provide environment information
Ubuntu 24
Which area(s) are affected? (Select all that apply)
Remote server, Cloud Version
Are you deploying the applications where Dokploy is installed or on a remote server?
Remote server
Additional context
No response
Will you send a PR to fix it?
Maybe, need help
Hi @midgogo! I'm Dosu and I’m helping the dokploy team.
This is a known issue! There are existing reports tracking this exact problem in #3465 and #3463.
Root Cause: The SaveContainerMetric function stores the full container name (e.g., app-service-1), but the query functions like GetLastNContainerMetrics and GetAllMetricsContainer truncate the name by removing the last dash-separated segment before querying. This was introduced when PR #3438 changed from LIKE prefix matching to exact matching but left the truncation logic in place.
Fix: Remove the name truncation logic from the query functions so queries use the same full container name that's stored in the database. This would be in the GetLastNContainerMetrics and GetAllMetricsContainer functions in apps/monitoring/database/containers.go.
If you'd like to contribute a PR, the fix should ensure consistency between how container names are saved versus queried.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.