Docker Container Monitoring
Containers make deployment easy, but they can still fail. Monitor your Docker services from the outside—the same way your users experience them.
Docker containers run your applications, but a "running" container isn't the same as a "working" service. External monitoring verifies that your containerized applications actually respond to requests correctly.
Why external Docker monitoring matters
Container status isn't service status
A container can be "healthy" according to Docker while the application inside is broken—database connection failures, deadlocks, or resource exhaustion don't always crash containers.
Orchestrators hide failures
Docker Swarm and Kubernetes restart failed containers automatically. Without external monitoring, you might not know your service crashed and restarted 50 times today.
Network and routing issues
Containers can be healthy but unreachable due to network configuration, load balancer issues, or DNS problems. External monitoring catches these infrastructure-level failures.
What to monitor in Docker environments
Service endpoints
- HTTP APIs – Monitor health check endpoints and critical API routes
- Web applications – Check that pages load with expected content
- TCP services – Monitor databases, Redis, message queues via port checks
Scheduled tasks and workers
- Cron containers – Use heartbeat monitoring for scheduled jobs
- Background workers – Monitor queue processors and async tasks
- Data pipelines – Verify ETL jobs complete on schedule
Monitoring patterns for Docker
Health check endpoints
Expose a /health or /healthz endpoint that verifies internal dependencies (database, cache, external services). Monitor this endpoint externally.
# Example: Add to your Docker cron job
0 * * * * /app/hourly-task.sh && curl -fsS https://updog.watch/ping/YOUR_TOKEN
Heartbeat monitoring for cron
Add a curl command at the end of scheduled tasks. If the task fails or doesn't run, the heartbeat monitor will alert you.
# In your docker-compose.yml cron service
command: >
sh -c "run-my-task && curl -fsS https://updog.watch/ping/YOUR_TOKEN"
Multi-service monitoring
For microservices architectures, monitor each service's public endpoint. This tells you which specific service is failing, not just that "something is wrong."
Docker Compose example
Here's a typical monitoring setup for a Docker Compose application:
services:
web:
image: myapp:latest
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
cron:
image: myapp:latest
command: >
sh -c "while true; do
/app/process-jobs.sh && curl -fsS https://updog.watch/ping/TOKEN;
sleep 3600;
done"
Then configure UpDog to monitor https://your-app.com/health for the web service, and set up a heartbeat monitor expecting pings every hour for the cron job.
FAQ
Related resources
Monitor your Docker services
External monitoring for containerized applications. Know when services fail, not just when containers restart.
Start Free- HTTP & TCP monitoring
- Heartbeat for cron jobs
- 1-minute check intervals
- Slack, PagerDuty alerts