Synology Install Netdata With Portainer

Synology Install Netdata With Portainer

My previous guide for Netdata involved the use of Task Scheduler. Today I’m offering a recommended and excellent alternative for installing the latest Netdata version via Portainer. Netdata is distributed, real-time, performance and health monitoring for systems and applications. It is a highly optimized monitoring agent you install on all your systems and containers. Netdata provides unparalleled insights, in real-time, of everything happening on the systems it runs on (including web servers, databases, applications), using highly interactive web dashboards. It can run autonomously, without any third party components, or it can be integrated to existing monitoring toolchains (Prometheus, Graphite, OpenTSDB, Kafka, Grafana etc). Netdata is fast and efficient, designed to permanently run on all systems (physical & virtual servers, containers, IoT devices), without disrupting their core function. Netdata is free, open-source software and it currently runs smoothly on Synology NAS, Linux, FreeBSD, and MacOS. In this step by step guide I will show you how to install Netdata on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Netdata v2.1.0 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it netdata. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Netdata Synology NAS Portainer Set up 1

 

  • STEP 4

Now create three new folders inside the netdata folder that you have previously created at STEP 3 and name them cache, config, data. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Netdata Synology NAS Portainer Set up 2

  • STEP 5

Right click on the netdata folder that you have previously created at STEP 3 then click Properties. Follow the instructions in the image below.

Netdata Synology NAS Set up 3 new 2024

  • STEP 6

Go to the Permission tab then click Advanced options. From the drop-down menu choose “Make inherited permissions explicit“. Follow the instructions in the image below.

Netdata Synology NAS Set up 4 new 2024

  • STEP 7

Select Everyone then click the Edit tab. Follow the instructions in the image below.

Netdata Synology NAS Set up 5 new 2024

  • STEP 8

Check all Read and Write Permissions. Click Done. Follow the instructions in the image below.

Netdata Synology NAS Set up 6 new 2024

  • STEP 9

After you click Done on STEP 8, check “Apply to this folder, sub-folders and files“. Click Save. Follow the instructions in the image below.

Netdata Synology NAS Set up 7 new 2024

  • STEP 10

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 11

In the Name field type in netdata. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

services:
  netdata:
    container_name: Netdata
    image: netdata/netdata:latest
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/19999' || exit 1
      interval: 10s
      timeout: 5s
      retries: 3
      start_period: 90s      
    security_opt:
      - apparmor=unconfined
    cap_add:
      - SYS_PTRACE
    environment:
       PUID: 1026
       PGID: 100
    ports:
      - 19999:19999
    volumes:
      - /sys:/host/sys:ro
      - /proc:/host/proc:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /volume1/docker/netdata/config:/etc/netdata:rw
      - /volume1/docker/netdata/data:/var/lib/netdata:rw
      - /volume1/docker/netdata/cache:/var/cache/netdata:rw
    restart: on-failure:5

Note: Before you paste the code above in the Web editor area below, change the value numbers for PUID and PGID with your own values. (Follow my step by step guide on how to do this.)

Netdata Synology NAS Portainer Set up 3

  • STEP 12

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Netdata Synology NAS Portainer Set up 4

  • STEP 13

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Netdata Synology NAS Portainer Set up 5

  • STEP 14

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 15

The installation process can take up to a few seconds. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-ip-address:19999 Click Skip and use the dashboard anonymously. Follow the instructions in the image below.

Netdata Synology NAS Portainer Set up 6

  • STEP 16

Your NAS metrics at a glance!

Netdata Synology NAS Portainer Set up 7

  • STEP 17

Netdata allows you to monitor the same parameters of Docker containers installed on your Synology NAS, all in real time.

Netdata Synology NAS Portainer Set up 8

  • STEP 18

If you want to remove Netdata from your NAS, just delete the netdata docker container, the netdata image and the netdata folder. Once you create the netdata folder in your main docker folder, you can’t delete it manually. As a workaround, follow the instructions below to delete the netdata folder.

  • STEP 19

Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.

Netdata Synology NAS Portainer Set up 9

  • STEP 20

Once you click on User-defined script, a new window will open. Follow the instructions below:

  1. General: In the Task field type in “Remove Netdata Folder“. Uncheck the “Enabled” option. Select root User.
  2. Schedule: Select Run on the following date then select “Do not repeat“.
  3. Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that, click OK.
rm -r /volume1/docker/netdata

Netdata Synology NAS Portainer Set up 10

  • STEP 21

After you click OK on STEP 20 a new warning pop up window will open. Click OK.

Netdata Synology NAS Portainer Set up 11

After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.

Synology Task Scheduler Confirm Admin Password

  • STEP 22

After you click Submit on STEP 21, select your “Remove Netdata Folder” Task then click the “Run” tab. You will be asked to run Remove Netdata Folder – click OK. Follow the instructions in the image below.

Netdata Synology NAS Portainer Set up 12

Enjoy Netdata!

🆘TROUBLESHOOTING

If you encounter issues by using this container, make sure to check out the Common Docker issues article.

Note: If you want to run the Netdata container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make Netdata work via HTTPS, it’s mandatory to activate WebSocket.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Netdata container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Friday / December 20th, 2024 at 10:43 PM