Introduction: Step-by-Step Guide: Installing Netdata for Real-Time Monitoring

Netdata is a highly efficient and real-time monitoring tool that provides comprehensive visibility into the performance of systems and applications. It is open-source and designed to be lightweight, enabling it to operate without any noticeable impact on system resources.

With Netdata, users can quickly identify and troubleshoot issues before they escalate into major problems, making it an essential tool for system administrators, DevOps engineers, and developers.

Supplies

  1. BrainyPi
  2. Keyboard
  3. Mouse
  4. Internet Connection

Step 1: Installation

Before we begin installation of Netdata, we need to install its dependencies. Run the following commands one-by-one.

sudo apt update
sudo apt upgrade
sudo apt install wget

Now, that the dependencies have been installed. We can start installation of netdata.

wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh

This command will use `wget` to download `kickstart.sh` file and then execute it.

We will need to agree to the terms and conditions of the project before proceeding further.

To proceed type `y` when prompted.

After this you will see a message saying "Installation was successful".


Step 2: Monitoring Temperature

Netdata can record the system temperature and graph it. By default this capability is disabled. We can enable it by editing the configuration file.

First we will open the directory containing the configuration file.

cd /opt/netdata/etc/netdata

Now, we need to open the file

sudo ./edit-config charts.d.conf

Within this file we need to remove the `#` from the line mentioned below

#sensors=force

Now, exit out of the file, using `ctrl+x`, then `y` then `enter`

We need to restart the service

sudo systemctl restart netdata.service

Step 3: Accessing the Web UI

Netdata ships with a nice web interface where we can see the real-time usage statistics of the system.

First, we need the IP address of the BrainyPi and then we need to make sure that our desktop and BrainyPi are on the same network.

Now, we can use the hostname command to find the IP address of the system.

hostname -I

Open up your favorite browser and then go to the following address.(Change the IP address)

http://ipaddress:19999


Step 4: Monitoring Multiple Servers

Assuming that netdata is installed on all of the servers. We can proceed with the configuration.

Start by editing the `netdata.conf` file on the central instance of netdata. For our installation we can find the configuration file in the following directory

cd /opt/netdata/etc/netdata

To edit the file open it using `nano` with `sudo`

sudo nano netdata.conf

Go to the bottom of the file and add

[plugin:remote]
enabled=yes
data source=REMOTE_IP_ADDRESS:REMOTE_PORT

If you want to monitor more than one server then add additional lines like so

[plugin:remote1]
enabled=yes
data source=REMOTE_IP_ADDRESS_1:REMOTE_PORT_1

NOTE: Replace `REMOTE_IP_ADDRESS_1:REMOTE_PORT_1 with ip addresses and ports of other netdata instances. Save and Exit out of the file.

After this the service needs to be restarted

sudo systemctl restart netdata.service


Step 5: Configuring the Other Instances

Now, that we have configured the central instance. We need to configure the client instances to send their data to the central instance.

For this go to the other instances and open the `netdata.conf` file

cd /opt/netdata/etc/netdata
sudo nano netdata.conf

Go to the `[web]` section in the file and add the following lines

bing socket to IP=*
bing socket to port=PORT_NUMBER

Now, restart the service

sudo systemctl restart netdata.service

Make sure the port number is free and unique

We need to configure each instance of netdata such that the port is unique for all instances.