Files
docker-infrastructure/netdata
2025-11-26 19:32:06 +00:00
..
2025-11-26 19:32:06 +00:00
2025-11-26 19:32:06 +00:00

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.

  1. Access Netdata at http://your-host-ip:19999
  2. Click on "Alert Notifications" in the left sidebar
  3. Select your notification service (Discord, Slack, etc.)
  4. Enter your webhook URL
  5. Test and save

Option 2: Configuration File

Create a custom alert configuration by editing the health_alarm_notify.conf file:

  1. After starting the container, exec into it:

    docker exec -it netdata bash
    
  2. 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"
  1. Test the notification:

    /usr/libexec/netdata/plugins.d/alarm-notify.sh test
    
  2. Restart the container to apply changes:

    docker restart netdata
    

Getting Webhook URLs

Discord:

  1. Go to Server Settings → Integrations → Webhooks
  2. Click "New Webhook"
  3. Copy the webhook URL

Slack:

  1. Go to https://api.slack.com/apps
  2. Create a new app or select existing
  3. Go to "Incoming Webhooks"
  4. Add webhook to workspace
  5. 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

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