Netdata Real-Time Monitoring
Netdata real-time performance and health monitoring for systems.
Overview
Netdata is an open-source, real-time performance monitoring and health monitoring system that was created by Costa Tsaousis in 2016. Originally designed to provide instant visibility into system performance with zero configuration, Netdata has evolved into a comprehensive monitoring platform that collects thousands of metrics per second from systems, applications, and services. Unlike traditional monitoring solutions that rely on periodic data collection, Netdata streams metrics in real-time with one-second granularity, making it invaluable for detecting performance anomalies and troubleshooting issues as they occur. This Docker implementation leverages extensive system access through volume mounts and elevated privileges to monitor both the host system and containerized workloads. The configuration maps critical system directories like /proc, /sys, and /var/log from the host into the container, enabling Netdata to collect comprehensive metrics about CPU usage, memory consumption, disk I/O, network traffic, and running processes. The Docker socket mount allows Netdata to discover and monitor other containers automatically, providing a unified view of both bare-metal and containerized infrastructure. This setup is particularly valuable for organizations transitioning to containerized environments, homelab enthusiasts seeking professional-grade monitoring, and development teams needing immediate feedback on application performance. The combination of zero-configuration deployment with Docker's portability means you can have enterprise-class monitoring running in minutes, complete with anomaly detection, customizable alerts, and interactive dashboards that update in real-time.
Key Features
- Real-time metric collection with 1-second granularity across 2000+ system and application metrics
- Automatic Docker container discovery and monitoring through Docker socket integration
- Machine learning-powered anomaly detection that learns normal behavior patterns
- Interactive web dashboard with drill-down capabilities and customizable charts at port 19999
- Zero-configuration deployment that automatically detects and monitors available services
- Memory-efficient design using a custom database engine optimized for time-series data
- Built-in alerting system with support for multiple notification channels including Slack, PagerDuty, and email
- Cloud synchronization capability for centralized monitoring across multiple nodes
Common Use Cases
- 1Homelab monitoring for enthusiasts running multiple Docker services on single-board computers or mini PCs
- 2Development environment monitoring to track resource usage during application testing and debugging
- 3Small to medium business server monitoring where dedicated monitoring infrastructure isn't cost-effective
- 4Container performance analysis for teams optimizing Docker workloads and identifying resource bottlenecks
- 5Educational environments for learning system administration and performance monitoring concepts
- 6Temporary monitoring deployment for troubleshooting performance issues on production systems
- 7Edge computing monitoring for IoT deployments and remote systems with limited connectivity
Prerequisites
- Docker Engine 20.10 or higher with support for security capabilities and AppArmor
- Minimum 512MB RAM allocated to Docker (Netdata typically uses 50-100MB for basic monitoring)
- Host system running Linux with /proc and /sys filesystems available for system metrics
- Port 19999 available on the host system for web dashboard access
- Docker socket access permissions if running as non-root user (user must be in docker group)
- Understanding of system monitoring concepts and willingness to grant elevated container privileges
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 netdata: 3 image: netdata/netdata:latest4 container_name: netdata5 hostname: ${HOSTNAME}6 cap_add: 7 - SYS_PTRACE8 - SYS_ADMIN9 security_opt: 10 - apparmor:unconfined11 volumes: 12 - netdata_config:/etc/netdata13 - netdata_lib:/var/lib/netdata14 - netdata_cache:/var/cache/netdata15 - /etc/passwd:/host/etc/passwd:ro16 - /etc/group:/host/etc/group:ro17 - /etc/localtime:/etc/localtime:ro18 - /proc:/host/proc:ro19 - /sys:/host/sys:ro20 - /etc/os-release:/host/etc/os-release:ro21 - /var/log:/host/var/log:ro22 - /var/run/docker.sock:/var/run/docker.sock:ro23 ports: 24 - "19999:19999"25 restart: unless-stopped26 networks: 27 - netdata-network2829volumes: 30 netdata_config: 31 netdata_lib: 32 netdata_cache: 3334networks: 35 netdata-network: 36 driver: bridge.env Template
.env
1# Netdata2HOSTNAME=docker-hostUsage Notes
- 1Dashboard at http://localhost:19999
- 2Real-time metrics
- 3Zero configuration
- 4Docker container monitoring
- 5Cloud dashboard optional
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 netdata:5 image: netdata/netdata:latest6 container_name: netdata7 hostname: ${HOSTNAME}8 cap_add:9 - SYS_PTRACE10 - SYS_ADMIN11 security_opt:12 - apparmor:unconfined13 volumes:14 - netdata_config:/etc/netdata15 - netdata_lib:/var/lib/netdata16 - netdata_cache:/var/cache/netdata17 - /etc/passwd:/host/etc/passwd:ro18 - /etc/group:/host/etc/group:ro19 - /etc/localtime:/etc/localtime:ro20 - /proc:/host/proc:ro21 - /sys:/host/sys:ro22 - /etc/os-release:/host/etc/os-release:ro23 - /var/log:/host/var/log:ro24 - /var/run/docker.sock:/var/run/docker.sock:ro25 ports:26 - "19999:19999"27 restart: unless-stopped28 networks:29 - netdata-network3031volumes:32 netdata_config:33 netdata_lib:34 netdata_cache:3536networks:37 netdata-network:38 driver: bridge39EOF4041# 2. Create the .env file42cat > .env << 'EOF'43# Netdata44HOSTNAME=docker-host45EOF4647# 3. Start the services48docker compose up -d4950# 4. View logs51docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/netdata-monitoring/run | bashTroubleshooting
- Permission denied accessing /proc or /sys: Ensure the container has SYS_PTRACE and SYS_ADMIN capabilities and verify host filesystem permissions
- Dashboard shows 'localhost' instead of hostname: Set the HOSTNAME environment variable in your Docker Compose file or host system
- Docker container metrics not appearing: Verify Docker socket is properly mounted and the Docker daemon is accessible from within the container
- High memory usage warnings: Adjust Netdata's memory limits in netdata.conf or increase available system memory as Netdata adapts to available resources
- Web dashboard not accessible: Check if port 19999 is blocked by firewall rules and ensure no other services are using the same port
- AppArmor security violations in logs: Add 'apparmor:unconfined' to security_opt or configure a custom AppArmor profile for Netdata container access
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
netdata
Tags
#netdata#monitoring#metrics#real-time#dashboard
Category
Monitoring & ObservabilityAd Space
Shortcuts: C CopyF FavoriteD Download