In this article, We are going to perform How to Install Netdata On Ubuntu 18.04/16.04 LTS system.
Table of Contents
Introduction
Netdata is real-time performance,troubleshooting and health Monitoring tool for Applications and Systems.Netdata is free and Open Source tool which supports for Linux, FreeBSD and MacOS systems which is helpful for SysAdmins, DevOps and Developers for troubleshooting real time issues.
Prerequisites
- Ubuntu 18.04/16.04 LTS with Minimal Installation
- SSH Access with sudo privileges
- Open Firewall Port: 19999
Step 1: Install Netdata on Ubuntu
Before installing make sure system packages are up to date.
$ sudo apt-get update $ sudo apt-get upgrade
We have to install some dependency packages before installing netdata,
$ sudo apt-get install zlib1g-dev uuid-dev libmnl-dev pkg-config curl gcc make autoconf autoconf-archive autogen automake python python-yaml python-mysqldb nodejs lm-sensors python-psycopg2 netcat git -y
Next, We have to Clone the Netdata Packages from Git, Enter below command.
$ sudo git clone https://github.com/firehol/netdata.git --depth=1 ~/netdata
Output:
Cloning into '/home/netdata/netdata'... remote: Enumerating objects: 1631, done. remote: Counting objects: 100% (1631/1631), done. remote: Compressing objects: 100% (1407/1407), done. remote: Total 1631 (delta 328), reused 604 (delta 191), pack-reused 0 Receiving objects: 100% (1631/1631), 3.38 MiB | 11.08 MiB/s, done. Resolving deltas: 100% (328/328), done.
$ ls
Output:
netdata
$ cd netdata/
$ sudo ./netdata-installer.sh
Output:
^
|.-. .-. .-. .-. . 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 >
Press “Enter” Key to proceed installation, after successful installation you will see below output at end.
Output:
netdata by default listens on all IPs on port 19999, so you can access it with: http://this.machine.ip:19999/ To stop netdata run: systemctl stop netdata To start netdata run: systemctl start netdata Uninstall script copied to: /usr/libexec/netdata/netdata-uninstaller.sh --- Install netdata updater tool --- Update script is located at /usr/libexec/netdata/netdata-updater.sh --- Check if we must enable/disable the netdata updater --- You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling) Did not find any cron entries to remove --- Wrap up environment set up --- Preparing .environment file Setting netdata.tarball.checksum to 'new_installation' --- We are done! --- ^ |.-. .-. .-. .-. .-. . netdata .-. .- | '-' '-' '-' '-' '-' is installed and running now! -' '-' +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> enjoy real-time performance and health monitoring... http://this.machine.ip:19999/ To stop netdata run: systemctl stop netdata To start netdata run: systemctl start netdata Uninstall script copied to: /usr/libexec/netdata/netdata-uninstaller.sh --- Install netdata updater tool --- Update script is located at /usr/libexec/netdata/netdata-updater.sh --- Check if we must enable/disable the netdata updater --- You chose *NOT* to enable auto-update, removing any links to the updater from cron (it may have happened if you are reinstalling) Did not find any cron entries to remove --- Wrap up environment set up --- Preparing .environment file Setting netdata.tarball.checksum to 'new_installation' --- We are done! --- ^ |.-. .-. .-. .-. .-. . netdata .-. .- | '-' '-' '-' '-' '-' is installed and running now! -' '-' +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---> enjoy real-time performance and health monitoring...
Finally, we need to start and enable the Netdata service to make the changes effect.
$ sudo systemctl start netdata $ sudo systemctl enable netdata $ sudo systemctl status netdata
Output:
netdata.service - Real time performance monitoring Loaded: loaded (/lib/systemd/system/netdata.service; enabled; vendor preset: enabled) Active: active (running) since Sat 2019-08-17 06:42:04 UTC; 3min 8s ago Main PID: 2796 (netdata) Tasks: 26 (limit: 1152) CGroup: /system.slice/netdata.service ├─2796 /usr/sbin/netdata -P /var/run/netdata/netdata.pid -D -W set global process scheduling policy keep -W set global OOM score keep ├─2887 /usr/libexec/netdata/plugins.d/go.d.plugin 1 ├─2889 /usr/bin/python /usr/libexec/netdata/plugins.d/python.d.plugin 1 ├─2890 /usr/libexec/netdata/plugins.d/apps.plugin 1 └─2891 bash /usr/libexec/netdata/plugins.d/tc-qos-helper.sh 1
Step 2: Add Firewall Rule
To allow traffic on port 19999 enter the below command:
$ sudo ufw allow 19999/tcp
Check the firewall status to verify if port is enables
$ sudo ufw status
Step 3: Netdata Web Interface
Open a browser and type the following URL of http://localhost:19999 OR http://IP-Address:19999
Memory and Swap Area
Finally, We have performed ,install netdata on ubuntu.
Step 3: Configure Netdata Alarm Email Notification
Netdata supports different typed alarm notification methods such as Amazon SNS,email,IRC,slack..,etc. To know more about supported notifications method, go through this link.
For Email notification , Netdata supports Sendmail as MTA (Mail Transfer Agent), make sure you have installed and configured sendmail on your system, if not go through below link.
How to Configure Sendmail to Relay Emails using Gmail SMTP on Ubuntu 18.04/16.04 LTS
To learn more about Netdata. Please refer Netdata official documentation.
Conclusion
In this article, we have performed how to install netdata on Ubuntu 18.04/16.04 LTS system.
How to Install Netdata on Ubuntu 20.04 LTS
How to Install Netdata on CentOS 7
How to download and Install Nagios on Ubuntu 18.04/16.04 LTS
How to Install Netdata using Ansible Playbook on Ubuntu 18.04/16.04 LTS.
How to Install ELK Stack on Ubuntu
Please follow below netdata official link to change default port or enable port in firewall, we have added command to enable port.
https://docs.netdata.cloud/web/server/