Set Up Slack Alerts for a Standalone Node using Netdata
This document provides a step-by-step guide to configure Slack alerts for a standalone node using the Netdata monitoring tool.
📘 Introduction to netdata
Netdata is an open-source, real-time monitoring tool designed to visualize and alert on system and application performance metrics. It provides powerful visualization dashboards, health monitoring with automatic alarms, and integrations with popular notification platforms like Slack.
🛠️ Step 1: Install netdata on the VM
Run the following command to download and install Netdata:
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh
✅ Verify the script integrity
During the process, the script will validate itself. If successful, it will return:
OK, VALID
You can use this command to check the status of netdata server.
sudo systemctl status netdata
🔔 Step 2: Configure slack notifications
Change to the Netdata config directory:
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
Edit the Slack notification config:
sudo ./edit-config health_alarm_notify.conf
Update the configuration as follows:
SEND_SLACK="YES" SLACK_WEBHOOK_URL="https://hooks.slack.com/services/XXXXXXXX/XXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" DEFAULT_RECIPIENT_SLACK="#alarms" # replace 'alarms' with your Slack channel name
If you don't have a Slack webhook URL, you can create one by following the link below. Create a Slack Incoming Webhook
💾 Step 3: Configure disk usage alert
Navigate to the health configuration directory:
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
Edit the disk usage alarm:
sudo ./edit-config health.d/disk_usage.conf
Example configuration:
# you can disable an alarm notification by setting the 'to' line to: silent # ----------------------------------------------------------------------------- # low disk space # checking the latest collected values # raise an alarm if the disk is low on available disk space template: disk_space_usage on: disk.space class: Utilization type: System component: Disk chart labels: mount_point=!/dev !/dev/* !/run !/run/* !HarddiskVolume* * calc: $used * 100 / ($avail + $used) units: % every: 1m warn: $this > 90 crit: $this > 95 delay: up 1m down 15m multiplier 1.5 max 1h repeat: warning 1200s critical 600s summary: Disk ${label:mount_point} space usage info: Total space utilization of disk ${label:mount_point} (ENV: sandbox ) to: sysadmin
🔁 Step 4: Restart netdata
Restart Netdata to apply configuration changes:
sudo systemctl restart netdata
🧪 Step 5: Test slack alert delivery
Run the following test command to trigger a dummy alert:
cd /etc/netdata 2>/dev/null || cd /opt/netdata /usr/libexec/netdata/plugins.d/alarm-notify.sh test
✅ You should receive a test message in your Slack channel.
❌ Step 6: Uninstall netdata (if needed)
If you want to remove Netdata from your system:
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall
This setup helps ensure you are promptly notified of potential issues on your VM, enhancing system reliability and awareness. And you can refere more on netdata here.
Last updated
Was this helpful?