Netdata is a distributed, near real-time, scalable performance and health monitoring solution for Linux, FreeBSD and MacOS. Yes! It’s open source. Netdata was designed in such a way that it could be installed on every Linux system without interrupting or deadlocking running applications on the server. You can use this tool to track and get an overview of what is happening in near real time on your Linux systems and applications. To track the availability of a site on the server, you can use the HOST TRACKER service, which you can get acquainted with on that website… The service notices problems on the site, notifies about the problem, keeps statistics and much more. So let me start with the Netdata article and walk you through installation, dashboard, multi-server monitoring, and finally uninstallation.
Netdata keeps track of everything it can:
- CPU core – interrupts, frequencies, etc.
- Memory – Total memory, RAM, swap file and kernel usage.
- Disk I / O to disk: bandwidth, operations, backlog, usage, etc.
- Networks – bandwidth, packets, errors, crashes, etc.
- Firewall – Monitor with netfilter / iptables in Linux for firewall connections, events, errors, etc.
- Processes – running, blocked, active, etc.
- System applications – with a tree of processes for cpu, memory, swap, disk read / write, threads, etc.
- Apache and Nginx status.
- MySQL database – queries, updates, locks, questions, etc.
- Postfix Mail Server Message Queue.
- Monitor Squid proxy throughput and requests.
- Hardware sensors – temperature, voltage, fans, power, humidity, etc.
- SNMP device.
Many people see netdata as an alternative to collectd + graphite, or compare it to munin. Netdata tries to offer a lot of functionality, of course without dedicated resources, within and with the toolbar utilities.
You will receive notifications on your mobile when you are out of the office. ABOUT! Netdata also supports real-time alarms. Netdata alerts can be configured for any combination of metrics and notifications can be sent.
So you thought about the hardware requirement, don’t worry, it can be installed on a simple machine that can save 1% to 3% on CPU usage. So let’s get started with installation, this article will cover installation on ARC Linux, Ubuntu 16.06 & CentOS 7.
For CentOS / Fedora netdata assuming one line script installation. The script will install the latest version of netdata and will also update it daily.
For a 32-bit system:
bash <(curl -Ss https://my-netdata.io/kickstart.sh
For a 64-bit system:
bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)
This command will execute automated scripts and start downloading Netdata
For Ubuntu 16.06, the first update of all important packages:
$ sudo apt-get update $ sudo apt-get install git zlib1g-dev uuid-dev libmnl-dev gcc make autoconf autoconf-archive autogen automake pkg-config curl python python-yaml python-mysqldb python-psycopg2 nodejs lm-sensors netcat
$ sudo pacman -S netdata $ sudo packman -S curl $ sudo curl -Ss 'https://raw.githubusercontent.com/firehol/netdata-demo-site/master/install-required-package.sh' > /tmp/kickstart.sh && bash /tmp/kickstart.sh -i netdata
Please note, this is all a dashboard hosted on the Internet, so if you install this on a server you can access this information from anywhere in the world.
How to get CPU information
Detailed information for each processor in the system. A brief description of the system can be found under: System overview -> CPU.
Detailed information about interrupts processed by the system processor.
Retrieve User Information
User statistics are collected using apps.plugin. This plugin goes through all the processes and aggregates statistics for users. For Like spell scripts processed, the reported values include the resources used by the commands that the scripts execute during each time period.
Below image shows dashboard for CPU 2.
Sampling memory usage in real time
Real memory (RAM) used for each user. It does not include shared memory. (Users.mem)
The data shown in the dashboard below for each user in the group and resource usage. Pink for clean data and red for root for% CPU time.
Web usage and monitoring
The web panel is so interesting it calculates metrics for each web resource. As you can see it in the list down under Netdata Monitoring -> Web, there are 2 threads running.
The Netdata CG dashboard shows information for proc and cgroups that accumulates data every millisecond. the plugins used for this dashboard are netdata.plugin_proc_cpu & netdata.plugin_cgroup_cpu.
Monitoring Netdata also helps with monitoring applications using apps.plugin, which collects data every millisecond from the user of various WRT metrics and system, calls, access files, targets and new threads generated.
How to get an alert
Netdata alarms show active alarms via system .softnet_stat. Below the picture shows how much time alarm is raised within 10 minutes. The alarm setting for the above system parameter is shown on the right side, where the db lookup, check each, execute the path. The location of the source of the configuration file can be specified here.
Alarm log in the alarm section. You can look at the date of the event, which shows the date and time of the alarm.
The kernel shows 2 different types of metrics, one is dirty matrices and the other is full kernel matrices. Dirty metrics show how much memory is waiting to be written to disk. Writes how much memory is being written to disk. The total amount of memory used by the kernel. SLAB is the amount of memory used by the kernel to cache its own data structure. The kernel stack is the amount of memory allocated for each task performed by the kernel. VMALLOCUSED is the amount of memory used as virtual address space.
- IPv4 network collects information throughput, packets, connection errors.
- TCP: connections, packets, errors, handshake.
- UDP: packets, errors, broadcast: bandwidth, packets.
- Interprocess communication – IPC like semaphores and arrays if needed.
- Netfilter / Iptables firewall on Linux: connection, connection events, errors.
Below are the images for networks, firewall and IPV4 network;
The graphs show the performance for all system data. Dedicated data-driven metric counter shows in real time for sysadmin. There is a special list in the disk menu that shows the space usage allocated to root, and if the user exits the space.
How to add multiple servers
That’s not all, go and grab a cup of tea … I managed to add multiple servers like ARCLinux, Ubuntu and CentOS and connect to a single portal where the sysadmin can easily control the server just by clicking a button. Yes it is possible, below image shows a list of another configured server.
- You need more than 1 server with Netdata installed,
- Go to browser and add server IP port no, 19999
- Likewise, browse for multiple IP servers, the list will be automatically added to the drop-down list for future use.
The Netdata-installer.sh script generates another netdata-uninstaller.sh script. To remove netdata run the command:
cd /path/to/netdata.git $ ./netdata-uninstaller.sh --force $ service netdata stop $ systemctl stop netdata
Disabling is done by netdata at startup, with one of the following methods (depending on your distribution):
$ rc-update del netdata $ update-rc.d netdata disable $ chkconfig netdata off $ systemctl disable netdata
Finally, delete all netdata files and delete the user (depending on the user’s needs),
$ rm -rf /opt/netdata $ groupdel netdata $ userdel netdata
That’s all for today, I hope you enjoyed the article, thank you for your support and look forward to your comments. Goodbye!