Netdata is a tool used for health monitoring and distributed real time performance of machines. It gives insights on anything that happens to a system through web dashboards.
Apart from its major function, Netdata has a number of advantages. It is very lightweight, meaning that it uses little CPU cycles and memory. Netdata comes with a responsive web interface which does not require any flash plugin to show the data. It shows data in well-displayed charts and graphs and a non-cluttered display, with the most important shown first.
Features of Netdata
- Uses a responsive bootstrap dashboard
- It is light and very fast, hence using fewer resources
- Little to no configuration is required to get started
- It is able to monitor the whole system
In this article we are going to learn how to install Netdata on a Linux system and will show examples. Like I said before, it is very light and does not need any special hardware or software requirements to get it running.
Note: this article was written with a Ubuntu machine. Most of the commands will work, regardless of the distro you are using.
To get started, you can choose to install either a basic or advanced version of Netdata. A basic installation includes system monitoring without other applications such as a database, SNMP and hardware sensors, while the advanced installation has all these other applications.
Run the following command for a basic Netdata installation:
curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh netdata
For the advanced Netdata installation, run this command:
curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-packages.sh' >/tmp/kickstart.sh && bash /tmp/kickstart.sh netdata-all
In my case I am installing the advanced version of Netdata. Running either of the commands above detects the specifications of your operating system, and you get an output similar to the following image.
After getting the output above, you can then press Enter to install all the dependencies. You will then get a message that asks you to proceed to the next step, as shown below.
You can now download Netdata by running the command below and make netdata the active directory after it is done downloading:
git clone https://github.com/firehol/netdata.git --depth=1
To build the software and have it installed, run the following command:
You will now see the following output.
Press Enter to continue with the installation. At this step the installer will be compiling the source and installing it, and you will be able to get the following output if you were successful.
Netdata daemon configurations are now held at “/etc/netdata/netdata.conf” which was created for you.
Configuration and Usage
To start netdata, you can run this command:
And this command stops it:
sudo killall netdata
Netdata shows you the above commands on a successful install. It also shows you the link to use if you want to access the charts and graphs it creates. In my case the following image is what it shows.
If you visit the link, you will see the following image.
You can set Netdata to start automatically on system boot by running the following commands:
sudo cp /usr/sbin/netdata /etc/init.d/netdata sudo update-rc.d netdata defaults
The configuration file can be edited using a text editor of your choice. The configuration file has all the lines commented or is empty. This means that Netdata only uses default values. If you would like to change anything, uncomment the line and change it from the default value. Some default values that can be changed include:
- Stored data. Netdata stores only data from the past hour. Change this from “history = 3600” to “history = (your choice).”
- Update interval. Netdata takes a second to refresh the charts and graphs in displays. To change this, change update every = 1 to your choice.
- Port. Netdata uses port 19999. You can change this port to any other one that you want.
If there is a newer version of Netdata released that you would like to update to, you can use the command below which gets the new version and updates Netdata:
cd netdata git pull sudo ./netdata-installer.sh
Running these commands uninstalls Netdata:
cd netdata ./netdata-uninstaller.sh --force
Netdata is a very useful tool. In a situation where you are running a system that is too slow or a server that is not working to your expectations, use Netdata to monitor their performance and find out what could be wrong. It allows you to monitor the CPU, memory, disks, network interfaces, IPV4 and IPV6 networking, interprocess communication, Netfilter, and processes among other items, therefore giving you the ability to understand your machine and configure it accordingly.
Our latest tutorials delivered straight to your inbox