Hey guys, have you ever felt a headache managing a server farm? When I first started out, whenever there was a problem or I wanted to check if my server was stable, I had to SSH into each one, running various commands like top, free -h, df -h. It was incredibly time-consuming, and the information was scattered and hard to synthesize.
I remember those days; having to fumble through each terminal screen just to see how the CPU or RAM was performing was truly torture. But things are different now; ever since professional monitoring tools became available, everything has become much easier. In particular, Netdata is one of those incredibly useful “companions” I want to share with you today. Just open the dashboard and you’ll see everything happening on the server, a million times more convenient!
So, what is Netdata? Why do I recommend it to you, especially those just starting in IT or DevOps?
What is Netdata and why do we need it?
Simply put, Netdata is a real-time performance monitoring tool. It collects data on everything possible on your server, from CPU, RAM, disk I/O, and network traffic to specific applications like web servers (Apache, Nginx), databases (MySQL, PostgreSQL), or even containers (Docker).
Netdata’s strengths:
- Real-time monitoring: It collects thousands of metrics per second with high resolution, displayed instantly on a web dashboard. It’s like having a security camera monitoring your server’s activity.
- Zero-configuration: It sounds magical, but Netdata can automatically detect most popular services and start collecting metrics without much configuration from your side.
- Very lightweight: Netdata is designed to run efficiently even on systems with limited resources.
- Intuitive web dashboard: All data is displayed in beautiful, easy-to-understand charts via a web browser.
- Extensible: Supports many plugins for monitoring various applications and services.
Compared to “big players” like Prometheus or Zabbix that my team has used, Netdata offers a different perspective. If Prometheus/Grafana excel in long-term storage, complex queries, and highly customizable dashboards, Netdata stands out for its ability to “quickly and directly view” what’s happening. It’s like an instant diagnostic tool, helping me quickly detect sudden issues without complicated initial configuration.
Hands-on: Installing and Configuring Netdata
Step 1: System Preparation
Netdata supports a variety of Linux distributions. In this guide, I will use Ubuntu 22.04, but the steps are similar for CentOS or Debian. Ensure your server has an internet connection and root or sudo privileges.
sudo apt update
sudo apt upgrade -y
If using CentOS/RHEL:
sudo yum update -y
Step 2: Install Netdata
The easiest way to install Netdata is to use the automatic installation script they provide. This script will check for dependencies, install them, and then install Netdata.
wget -O /tmp/netdata-installer.sh https://my-netdata.io/kickstart.sh
sh /tmp/netdata-installer.sh --dont-wait
The --dont-wait command allows the script to run non-interactively. This process may take a few minutes depending on your network speed and server performance.
After installation, Netdata will automatically start and run as a service.
sudo systemctl status netdata
You will see output similar to:
● netdata.service - Real-time performance monitoring
Loaded: loaded (/etc/systemd/system/netdata.service; enabled; vendor preset: enabled)
Active: active (running) since ...
Step 3: Access the Netdata Dashboard
By default, Netdata operates on port 19999. You can access the dashboard by opening your browser and typing the address: http://<your_server_IP>:19999.
If you are using a firewall (e.g., UFW), make sure port 19999 is open:
sudo ufw allow 19999/tcp
sudo ufw reload
And that’s it! You will see a beautiful dashboard with a series of charts displaying CPU usage, RAM, disk I/O, network traffic… All in real-time.
Step 4: Basic Configuration (Optional)
Netdata works very well with its default configuration, but sometimes we need to make some tweaks. Netdata’s main configuration file is located at /etc/netdata/netdata.conf. However, Netdata encourages us to use the /etc/netdata/conf.d/ directory to manage separate configurations for each module. This makes updates easier without being overwritten.
For example, to change the IP address Netdata listens on or the default port, you can edit /etc/netdata/netdata.conf. Personally, I usually keep this file untouched and create separate configuration files in conf.d when I need to fine-tune a specific module.
To edit the main configuration file:
sudo nano /etc/netdata/netdata.conf
Find the [web] section, and you can change bind to if desired:
[web]
bind to = 0.0.0.0
# bind to = 127.0.0.1
0.0.0.0 allows access from all IP addresses, while 127.0.0.1 only allows access from localhost. After making changes, remember to restart Netdata:
sudo systemctl restart netdata
Monitor Specific Applications
Netdata can automatically detect many applications, which I really appreciate. For instance, if Apache/Nginx or MySQL is running, Netdata will usually automatically find and display relevant charts. If not, you need to check the configuration in /etc/netdata/conf.d/. For example, with Nginx:
sudo nano /etc/netdata/python.d/nginx.conf
You need to ensure this module is enabled and the Nginx stub status url is correctly configured (if you have already configured it on Nginx).
To enable Nginx stub status (if not already enabled):
sudo nano /etc/nginx/sites-available/default
Add the following snippet to the server block:
location /nginx_status {
stub_status on;
allow 127.0.0.1; # Only allow localhost access
deny all;
}
Then check and reload Nginx:
sudo nginx -t
sudo systemctl reload nginx
And remember to restart Netdata for it to re-read the configuration:
sudo systemctl restart netdata
Step 5: Configure Alerts
Netdata has a very powerful integrated alert system. It comes with hundreds of pre-configured alerts for common situations (CPU overload, disk full, low RAM…). You can view and edit these alerts in the /etc/netdata/health.d/ file.
For example, I want to receive an alert when CPU usage exceeds 80% for 5 minutes. The sample configuration file is cpu.conf:
sudo nano /etc/netdata/health.d/cpu.conf
Navigate to the CPU section and adjust the threshold or create a new rule. Netdata uses its own language for these rules, which is quite easy to understand. Something like:
alarm: cpu_usage_total_critical
on: system.cpu
lookup: average -5m percentage >= 80
every: 1m
class: Utilization
type: System
info: CPU utilization is above 80% for 5 minutes.
warn: $this > 80
crit: $this > 95
to: sysadmin
For Netdata to send alerts, you need to configure notification methods like email, Telegram, Slack… in the /etc/netdata/health_notifier.d/default.conf or /etc/netdata/health_notifier.conf file. I often use Telegram because it’s fast and convenient. This is a fairly large file, but you just need to find the # TELEGRAM section. Then configure SEND_TELEGRAM="YES", along with the appropriate TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID. Finally, remember to restart Netdata.
Conclusion
Netdata is truly a “small but mighty” tool. With its extremely detailed real-time monitoring capabilities, simple installation, and intuitive dashboard, it’s an ideal choice for anyone who wants to quickly grasp their server’s status.
Especially for beginners, Netdata will help you get an overview of your system without spending too much effort on initial configuration. I believe that once you get used to “opening the dashboard and seeing everything,” you won’t want to go back to SSHing into each server individually!
Try installing and experiencing Netdata today. If you have any questions during the process, feel free to leave a comment!
