Monitor Server Health with Netdata on Ubuntu
Summary:
Install and use Netdata to monitor Ubuntu server in real time.
Effective server health monitoring is essential for running reliable applications and services. Netdata is a powerful, open-source, and real-time monitoring tool that provides insightful metrics about your system’s performance. In this article, you'll learn how to install Netdata on Ubuntu, access its rich dashboard, and use its features to keep your server in top shape.
Why Use Netdata?
- Real-Time Monitoring: Instant stats and visualizations for CPU, memory, disk, network, services, and more.
- Lightweight: Minimal performance overhead on your server.
- Comprehensive: Hundreds of metrics, including detailed disk I/O, database performance, and application-layer insights.
- Easy to install and configure: Almost zero setup.
Prerequisites
- An Ubuntu server (tested with Ubuntu 20.04/22.04).
sudo
privileges.
Step 1: Install Netdata
Netdata provides a simple installation script. Open your terminal and run:
bash <(curl -Ss https://my-netdata.io/kickstart.sh)
What this does:
- Detects your OS and installs necessary dependencies.
- Builds and installs Netdata from source for optimal performance.
Automated Upgrades
By default, Netdata sets up automatic nightly updates. You can change this behavior, but it ensures you always have the latest features and security fixes.
Step 2: Start and Enable Netdata Service
After installation, Netdata usually starts automatically. To verify, run:
sudo systemctl status netdata
If it's not running, start and enable it:
sudo systemctl start netdata
sudo systemctl enable netdata
Step 3: Access the Netdata Dashboard
By default, Netdata serves its web dashboard on port 19999. To access it, open your web browser and navigate to:
http://your_server_ip:19999
If you’re running a local server, use localhost
:
http://localhost:19999
Note: Make sure your firewall permits port 19999. For uncomplicated firewall (UFW):
sudo ufw allow 19999/tcp
Step 4: Explore the Dashboard
The Netdata dashboard is organized into intuitive sections:
- System Overview: CPU, memory, disk, swap usage.
- Network: Bandwidth, packet rates, errors.
- Processes: Per-process resource consumption.
- Services: Apache, NGINX, MySQL, Docker, and more (supports hundreds of applications).
- Alerts: Visual and email alerts for abnormal activity.
Hover over any chart for detailed metrics, trends, and context menus.
Step 5: Secure Your Netdata Instance
Netdata's web dashboard is open to anyone with access to port 19999. For production servers:
Option 1: Localhost Only + SSH Tunnel (Recommended)
-
Bind Netdata only to localhost (edit
/etc/netdata/netdata.conf
):[web] bind to = 127.0.0.1
-
Restart Netdata:
sudo systemctl restart netdata
-
Use SSH tunnel from your local machine:
ssh -L 19999:localhost:19999 youruser@your_server_ip
Then, visit
http://localhost:19999
in your browser.
Option 2: Reverse Proxy with Authentication
Set up Netdata behind NGINX or Apache; add HTTPS and HTTP authentication. Official proxy guide.
Step 6: Set Up Email Alerts
Netdata can send alerts for high CPU, memory usage, disk errors, and more. To configure:
-
Edit the Netdata health alarm configuration file (per-service/host basis):
/etc/netdata/health_alarm_notify.conf
-
Enable and set up your preferred notification method (e.g., email, Slack, SMS).
For email, set:
SEND_EMAIL="YES" DEFAULT_RECIPIENT_EMAIL="your_email@example.com"
Then, restart Netdata:
sudo systemctl restart netdata
Step 7: (Optional) Monitor Multiple Servers
Deploy Netdata on all your servers and use Netdata Cloud to aggregate metrics, set global alerts, and explore fleet-wide analytics—all for free.
Uninstalling Netdata
If you ever need to remove Netdata:
sudo /usr/libexec/netdata/netdata-uninstaller.sh --force
Conclusion
Netdata transforms Ubuntu server monitoring with its real-time, interactive dashboard and straightforward installation. Within minutes, you gain deep visibility into performance, resource usage, and system health, making it much easier to troubleshoot and optimize your infrastructure.
Resources:
Try Netdata today and make downtime, bottlenecks, and capacity issues a thing of the past!