Installing Netdata – A Real Time Performance Monitoring Tool

How to install Netdata in CentOS 7

Installing Netdata : Netdata is a free open soure software which collects a real-time performance data from Linux systems, Application, SNMP devices and visualize it in the web-based interface. Netdata also provides the visualization of past data’s. In simple word, it provides a real-time visualization of what is happening on your systems.

Prerequisites for installing

  • CentOS 7.
  • root privileges.

Features of Netdata

  • Stunning bootstrap dashboards, out of the box (theme: dark, light)
  • You can build Custom dashboards using simple HTML
  • Zero-configuration – no configuration
  • Zero dependencies – has its own web server for its static web files and its web API
  • Zero maintenance, you just run it, that’s all
  • Very fast and efficient
  • Extensible, you can monitor anything using its Plugin API

Monitoring Features

  • CPU usage, interrupts, softirqs, and frequency
  • RAM, swap and kernel memory usage
  • Disks
  • Network interfaces
  • IPv4 networking
  • IPv6 networking
  • netfilter / iptables Linux firewall
  • Linux anti-DDoS protection
  • Processes
  • Entropy
  • NFS file servers, v2, v3, v4
  • Network QoS
  • Applications, by grouping the process tree
  • Apache web server mod-status (v2.2, v2.4)
  • Nginx web server stub-status
  • mySQL databases
  • ISC Bind name server
  • Postfix email server message queue
  • Squid proxy server
  • Hardware sensors
  • NUT UPSes
  • Monitor SNMP devices with extra configuration.

Installing Netdata:

Install the zlib development package and other packages.

yum install zlib-devel gcc make git autoconf autogen automake pkgconfig psmisc
yum install curl libmnl-devel libuuid-devel lm-sensors MySQL-python nc pkgconfig python python-psycopg2 PyYAML

Once the installation process completed, Run the following command to clone the netdata git.

git clone https://github.com/firehol/netdata.git --depth=1

Sample Output

[root@webhostingchennai ~]# git clone https://github.com/firehol/netdata.git --depth=1
Cloning into 'netdata'...
remote: Counting objects: 782, done.
remote: Compressing objects: 100% (729/729), done.
remote: Total 782 (delta 114), reused 157 (delta 36), pack-reused 0
Receiving objects: 100% (782/782), 2.63 MiB | 399.00 KiB/s, done.
Resolving deltas: 100% (114/114), done.
[root@webhostingchennai~]#
cd netdata

Execute the automatic installation to begin the installation of netdata.

./netdata-installer.sh

You would get an interactive prompt for installing netdata, press Enter to begin the installation.

^
|.-. .-. .-. .-. . netdata
| '-' '-' '-' '-' real-time performance monitoring, done right!
+----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->

You are about to build and install netdata to your system.

It will be installed at these locations:

- the daemon at /usr/sbin/netdata
- config files in /etc/netdata
- web files in /usr/share/netdata
- plugins in /usr/libexec/netdata
- cache files in /var/cache/netdata
- db files in /var/lib/netdata
- log files in /var/log/netdata
- pid file at /var/run/netdata.pid
- logrotate file at /etc/logrotate.d/netdata

This installer allows you to change the installation path.
Press Control-C and run the same command with --help for help.

Press ENTER to build and install netdata to your system >

The above prompt would let you know where all your files will be placed. If you don’t want to install it in the default directories, you can run the installer like this: ./netdata-installer.sh –install /opt. This will install netdata in /opt/netdata.

At the end of the installation, you would get an output like below.

——————————————————————————-

ok. NetData is installed and is running.

Hit http://localhost:19999/ from your browser.

To stop netdata, just kill it with following command

killall netdata

To start it, just run it:

/usr/sbin/netdata

Additional Information

I see you have kernel memory de-duper (called Kernel Same-page Merging,or KSM) available, but it is not currently enabled.

To enable it run:

echo 1 >/sys/kernel/mm/ksm/run
echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs

If you enable it, you will save 20-60% of netdata memory.

Uninstall script generated:

./netdata-uninstaller.sh

Installer will start the netdata on completion of installation, verify that netdata is running using the following.

netstat -antup | grep 19999
tcp6 0 0 :::19999 :::* LISTEN 5017/netdata

Accessing Netdata:

Configure the firewall to allow access to netdata web interface for the external machines, only valid if the firewalld is installed on your machine.

firewall-cmd --permanent --add-port=19999/tcp
firewall-cmd --reload

Open up your web browser and navigate it to http://your-ip-address or http://localhost:19999/.

To configure netdata in your own customized port

Edit the netdata configuration file

nano /etc/netdata/netdata.conf

Under [web] category, Check for “default port”

remove # and enter the desired port number you need, Here I used port 3000

After editing the configuration file, restart netdata service

systemctl restart netdata.service

Now, Add the port in firewall

firewall-cmd --permanent --add-port=3000/tcp
firewall-cmd --reload

Once it done, you can now able to view the netdata page by accessing http://your_ip_address:3000/

installing netdata

Installing Netdata

For installing other monitoring tools, please click here

You may also like...

Leave a Reply

Your email address will not be published.