14fb7b0e93
Fix volume data for under the /srv directory
Netdata - Docker Host Monitoring
Comprehensive real-time monitoring for Docker host and containers with alerting capabilities.
Features
-
Container Monitoring: Auto-detects and monitors all Docker containers
- CPU, memory, network, disk I/O per container
- Container state monitoring (running, stopped, unhealthy)
- Pre-configured alerts for resource usage
-
Host Monitoring: Full system metrics
- CPU, memory, disk, network usage
- Process monitoring
- System health checks
-
Built-in Alerts: Pre-configured alarms for:
- Container CPU and memory usage
- Container health status
- System resource exhaustion
- Disk space usage
Access
Once deployed, access Netdata at: http://your-host-ip:19999
Webhook Notifications Setup
Netdata supports Discord, Slack, and many other notification methods.
Option 1: Via Web UI (Recommended)
- Access Netdata at
http://your-host-ip:19999 - Click on "Alert Notifications" in the left sidebar
- Select your notification service (Discord, Slack, etc.)
- Enter your webhook URL
- Test and save
Option 2: Configuration File
Create a custom alert configuration by editing the health_alarm_notify.conf file:
-
After starting the container, exec into it:
docker exec -it netdata bash -
Edit the notification config:
cd /etc/netdata ./edit-config health_alarm_notify.conf
For Discord:
SEND_DISCORD="YES"
DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN"
DEFAULT_RECIPIENT_DISCORD="alarms"
For Slack:
SEND_SLACK="YES"
SLACK_WEBHOOK_URL="https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
DEFAULT_RECIPIENT_SLACK="alarms"
For Generic Webhook:
SEND_CUSTOM="YES"
CUSTOM_SENDER="${status}"
DEFAULT_RECIPIENT_CUSTOM="alarms"
-
Test the notification:
/usr/libexec/netdata/plugins.d/alarm-notify.sh test -
Restart the container to apply changes:
docker restart netdata
Getting Webhook URLs
Discord:
- Go to Server Settings → Integrations → Webhooks
- Click "New Webhook"
- Copy the webhook URL
Slack:
- Go to https://api.slack.com/apps
- Create a new app or select existing
- Go to "Incoming Webhooks"
- Add webhook to workspace
- Copy the webhook URL
Alert Configuration
Netdata comes with sensible defaults, but you can customize:
- Alert thresholds: Edit individual alarm files in
/etc/netdata/health.d/ - Notification frequency: Configure repeat intervals in
health_alarm_notify.conf - Alert filtering: Set up role-based notifications
Monitoring Capabilities
- Real-time metrics with 1-second granularity
- Automatic anomaly detection
- Zero-configuration auto-detection of containers
- Historical data retention
- Beautiful web dashboard with interactive charts
Resources
- Official docs: https://learn.netdata.cloud/
- Alert configuration: https://learn.netdata.cloud/docs/alerting/
- Notification setup: https://learn.netdata.cloud/docs/alerting/notifications/
Notes
- The container requires privileged access and specific capabilities to monitor the host system
- Docker socket is mounted read-only for security
- Data persists across container restarts via Docker volumes