-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
Description
To Reproduce
- Create a Docker Compose application in Dokploy
- Deploy it (containers will have names like
appname-service-1) - Wait 1-2 minutes for metrics collection
- Go to the application → Monitoring tab
- Select any container from dropdown
- Observe: metrics show error or empty state
Debug verification:
# Check metrics are being saved (on the server)
sqlite3 /var/lib/dokploy/metrics.db "SELECT DISTINCT container_name FROM container_metrics;"
# Returns: appname-postgres-1, appname-redis-1, etc.
# Check what the API queries for
curl localhost:4500/metrics/containers?appName=appname-postgres
# Returns: null (because it searches for "appname" after stripping)Current vs. Expected behavior
Current Behavior
Container metrics UI shows error or empty data. API endpoint /metrics/containers returns null for all containers.
Expected Behavior
Container metrics should display CPU, memory, network usage graphs for all monitored containers.
Provide environment information
- **Dokploy version:** latest
- **Deployment type:** Docker Compose
- **OS:** Ubuntu 22.04 (VPS)
- **Docker version:** 27.xWhich area(s) are affected? (Select all that apply)
Docker Compose
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
PR #3438 changed container name matching from LIKE ? || '%' to exact match (= ?) to fix collision issues between similarly named containers.
However, the stripping logic that removes the last -segment from container names was not removed. This logic was originally needed for LIKE prefix matching but now breaks exact matching.
Will you send a PR to fix it?
No