How to install Netdata to monitor your linux system

How to install Netdata to monitor your linux system

This article will tell how to install Netdata to monitor your linux system such as Linux Centos 7, Centos 8 or Ubuntu.

Netdata is very power full real time monitoring tools for Linux that are monitor all system health.

The best way to install Netdata is using one line command from Netdata, including required system packages, compile Netdata, install Netdata and start Netdata.

How to install Netdata real time monitoring

Below is single line command to install Nedata

There is no problem when you installing Netdata on Centos 7.

But on Centos 8, if you see an error, just ignore and enter to start Netdata installation.

The problem is Netdata doen not have user authentication.

So we will use Nginx http authentication or Apache http authentication.

Add nginx upstream configuration like below:

Add the following code to server block:

Create user authentication, for example username is serverdiary

Netdata configuration to monitor Nginx

Enable Nginx status to monitor your Nginx, copy code below and save to /etc/nginx/conf.d/status.conf

Restart Nginx to load new configuration

Create file /etc/netdata/python.d/nginx.conf and paste the following code

How to Monitoring Nginx with Netdata
How to Monitoring Nginx with Netdata

Netdata configuration to monitor Apache

Enable Extended Status on your apache configuration, create /etc/httpd/conf.d/status.conf and paste code below

Restart apache / httpd to reload new configuration

Create file /etc/netdata/python.d/apache.conf and paste the following code

How to use Nedata Authentication behind Apache / httpd using mod_proxy

Create authentication htpasswd file in /etc/httpd/conf/.htpasswd

Then add this configuration to your virtual host

Restart Netdata with command

How to Monitoring Apache with Netdata
How to Monitoring Apache with Netdata

Open browser and check on http://yourdomain/netdata

3 thoughts on “How to install Netdata to monitor your linux system

  1. Great article, unfortunately does not work on Cent OS 8 default install.

    [root@web2 conf.d]# systemctl restart httpd
    Job for httpd.service failed because the control process exited with error code.
    See “systemctl status httpd.service” and “journalctl -xe” for details.
    [root@web2 conf.d]# systemctl status httpd.service
    ● httpd.service – The Apache HTTP Server
    Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
    Drop-In: /usr/lib/systemd/system/httpd.service.d
    └─php-fpm.conf
    Active: failed (Result: exit-code) since Wed 2020-01-08 11:57:36 EET; 19s ago
    Docs: man:httpd.service(8)
    Process: 18133 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
    Main PID: 18133 (code=exited, status=1/FAILURE)

    Jan 08 11:57:36 web2 systemd[1]: Starting The Apache HTTP Server…
    Jan 08 11:57:36 web2 httpd[18133]: httpd: Syntax error on line 356 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf.d/status.conf: /etc/httpd>
    Jan 08 11:57:36 web2 systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
    Jan 08 11:57:36 web2 systemd[1]: httpd.service: Failed with result ‘exit-code’.
    Jan 08 11:57:36 web2 systemd[1]: Failed to start The Apache HTTP Server.

    [root@web2 conf.d]# nano status.conf
    [root@web2 conf.d]# nano /etc/httpd/conf/httpd.conf

Leave a Reply

Your email address will not be published. Required fields are marked *