Skip to content

HOWTO Synology DSM7 Telegraf

Mikaël ANDRE edited this page Oct 31, 2022 · 1 revision

HOWTO+Synology+DSM7+Telegraf

This how-to aims to create a custom Telegraf container on Synology NAS with Docker and Portainer for Freebox monitoring

1. Portainer

To create a custom image of Telegraf, you need to go to Portainer

  • Once log in, you need to connect to your environment
  • Then, click on Image > Click on Build a new image button
    • On current window, you have to do the following:
      • In Naming section, give the following name: telegraffbx
      • In Web editor section, paste the following content:
FROM telegraf:latest
RUN apt-get update && apt-get upgrade
RUN dpkg --configure -a
RUN apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
RUN wget https://bootstrap.pypa.io/get-pip.py
RUN apt-get install python3-distutils -y
RUN python3 get-pip.py --prefix=/usr/local 
RUN python3 -m pip install requests 
RUN pip install unidecode 
RUN touch /usr/local/bin/.credentials
RUN echo '[mafreebox.freebox.fr]' > /usr/local/bin/.credentials
RUN echo 'track_id = 1' >> /usr/local/bin/.credentials
RUN echo 'app_token = <YOUR Freebox token>' >> /usr/local/bin/.credentials
RUN echo 'app_id = fr.freebox.grafanamonitor' >> /usr/local/bin/.credentials
RUN echo 'app_name = GrafanaMonitor' >> /usr/local/bin/.credentials
RUN echo 'device_name = GrafanServer' >> /usr/local/bin/.credentials
* In **Action** section, click on **Build the image**

Clone this wiki locally