Installing Netdata on GridPane

Content Error or Suggest an Edit

Notice a grammatical error or technical inaccuracy? Let us know, we will give you credit!

DISCLAIMER

The following commands change how your GridPane server functions. This may void any support provide by GridPane, use at your own discretion. If you contact GridPane support, inform them that you made these changes.

Draft Warning

You’ve reached a draft 🤷‍♂️ and unfortunately, it’s a work in progress.

Installing Netdata

This part is easy, once you sign up for Netdata. You’ll be given a command to run via SSH as root

Enabling Nginx Monitoring

To be able to monitor Nginx, there are some added steps.

Step 1 – Enable stub_status page

You will need to enable the stub_status module on your system. GridPane has this configuration in /etc/nginx/sites-available/222222 but I don’t know what it’s for? It’s not enabled.

So you can simply just create a new file under /etc/nginx/sites-available called nginx_status and add the contents below.

server {
    listen 127.0.0.1:80;
    server_name 127.0.0.1;
    location /stub_status{
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        deny all;
    }
    location /nginx_status{
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        deny all;
    }
}

Why two locations? The /stub_status is for Netdata, and the /nginx_status is for Nginx amplify. It all depends on what you want to use. I included both.

You then want to enable the site!

ln -s /etc/nginx/sites-available/nginx_status /etc/nginx/sites-enabled/nginx_status

Double-check your syntax is correct by running nginx -t

❯ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Now you can restart Nginx

systemctl restart nginx

Step 2 – Configure NetData (optional)

If you used the Nginx configuration I mentioned, then you don’t need to do anything. Netdata will work out of the box.

However, I’m pretty sure GridPane will wipe this configuration and eventually provide stub_status using a custom URL. If so then follow this step.

Open up the Netdata config for Nginx

cd /etc/netdata
./edit-config python.d/nginx.conf

Go to the bottom of the file and add the following.

gridpane:
  name : 'gridpane'
  url  : 'http://localhost:222222/nginx_status'

The URL portion is where the stub_status is exposed.

0 Shares:
You May Also Like
Read More

GridPane Local Backups

The following article serves to provide details on how local backups are completed when using GridPane. Backup Location…