Monitoring with Grafana

Currently reading
Monitoring with Grafana

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
Hi. especially to @Rusty,

Rusty, I noticed that you wrote a blog for monitoring a Synology DS with Telegraf, InfluxDB und Grafana, each running in a dedicated docker container: Grafana - InfluxDB - Telegraf (GIT) monitoring setup via docker

Since I'm starting to switch from a SNMP driven monitoring solution (LibreNMS) to Grafana, I wonder if there is a second option for not using a Telegraf docker container. Why asking this? Simply because my DS214+ cannot run any docker containers.

Yesterday, I've installed a Telegraf-only package on my Raspberry Pi and wonder if I can do the same on my DS214+ now - did not find any instructions so far.
Do you have any experiences with a similar setup?

Next question: there are docker containers that implement all three tools: Telegraf, InfluxDB and Grafana. Do you recommend them over running each in a dedicated container?
I've read somewhere, that I've to install some MiB files from Synology to get Telegraf picking up the metrics from diskstations. You did not mention this in your blog, so isn't it a prerequisite?

Thanks,
Michael
 

Rusty

Staff member
Moderator
NAS Support
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Do you have any experiences with a similar setup?
Sorry I perosonally haven't tested Grafana setup (or any other component) without the use of Docker, so I can't help on that front. I can tell you that depending on the power of your rPi you could run the docker platform on it and then try and see if you could run containers on it. Not sure how stable it will be but you would give it a go.

If you do wanna track your stats (or hdd stats for that matter) you will have to run that on your NAS and atm thats not an option for your considering you don't have the option to run docker. Also, regarding MiBs, no you don't have to have them installed, as I said before, thats just for specific stats you wanna capture (like hdd stats in greater detail). If you want to get the basic stats for your nas (and still get them in a better and more detain view then the resource monitro) you can just use the default telegraf tags.

With the upcoming dsm 7 and Active Insight, I will be reviewing if Grafana will remain my main overview platform or not. Something to have on your mind.
 

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
Sorry I perosonally haven't tested Grafana setup (or any other component) without the use of Docker, so I can't help on that front. I can tell you that depending on the power of your rPi you could run the docker platform on it and then try and see if you could run containers on it. Not sure how stable it will be but you would give it a go.
I do not have any plans to run any docker on my raspberry, but I installed Telegraf for collecting the Raspberry metrics. InfluxDB and Grafana themselves still should run on my Synology as (one or more) docker container, simply because those are more powerful devices.

If you do wanna track your stats (or hdd stats for that matter) you will have to run that on your NAS and atm thats not an option for your considering you don't have the option to run docker. Also, regarding MiBs, no you don't have to have them installed, as I said before, thats just for specific stats you wanna capture (like hdd stats in greater detail). If you want to get the basic stats for your nas (and still get them in a better and more detain view then the resource monitro) you can just use the default telegraf tags.
OK, this helps already a lot because so far I assumed that I need those MiB files.

With the upcoming dsm 7 and Active Insight, I will be reviewing if Grafana will remain my main overview platform or not. Something to have on your mind.
AS mentioned, I would like to use Grafana, because I'm not only monitoring Synology DS, but planning to monitor my firewall (IPFire), some Ubiquity devices like switches and access points and maybe some others in my home lab, too.

Thanks,
Michael
 

Rusty

Staff member
Moderator
NAS Support
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
AS mentioned, I would like to use Grafana, because I'm not only monitoring Synology DS, but planning to monitor my firewall (IPFire), some Ubiquity devices like switches and access points and maybe some others in my home lab, too.
Same as me... I use it for more then just Syno. Nice one m8, let me know if you need hand or have any cool dashboard/scenario to share.
 

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
Are you settled in Schwarzwald, Germany? The website www.blackvoid.club somehow tells me that :cool:
 

Rusty

Staff member
Moderator
NAS Support
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
LOL!! "black" somehow translates into the German word Schwarz and "void" sounds like a Bavarian dialect expression for forest or in German words: "Wald". Altogether Schwarz-Wald (black forest) :p

Croatia is a nice country, have been there several time, recently in 2016. (y)
 

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
Hi @Rusty!

a little feedback regarding your blog Grafana - InfluxDB - Telegraf:
Some of the instructions are a bit hard to follow since you are missing some details for CLI noobs or Linux noobs in general :rolleyes:

Some info about using a SSH terminal to log into Synology DS, especially on how to sudo would be fine, since root credentials are absolutely necessary to execute most of the given command.

A short hint about the line breaks in the given command lines would be fine, too. You added a backslash at the end of those lines, but nevertheless when copying&pasting the lines into the terminal, it's necessary to remove those backslashes (using e.g. Windows notepad). A noob would probably assume that the backslashes are part of the appropriate commands.

General
You are using many exported docker paths pointing to various folders on your Syno volume. However, you did not explain that those folders must be created beforehand, regarding your command line examples, this is an important prerequisite.

Installation of InfluxDB
The path to the data of the influx DB may not be correct. You noted "-v /docker/containers/influxdb/conf/influxdb.conf", but in all subsequent examples you used the path e.g. "/volume1/docker/telegraf/config/telegraf.conf". Those paths may be correct for your installation, mine is different of course but very similar, but what's more important, I guess you are missing the volume in the first path above. This may confuse sbdy who is doing a docker installation for the first time ever. I had no problems because I've done this several times recently.

Authentication of Influx DB
Perhaps you are missing some basic information on how to create a user in InfluxDB for authentication purposes. I mention this here because you said that the telegraf.conf should be edited at the lines where the authentication to the InfluxDB is configured.
Giving an example of some CLI commands of creating a telegraf user in InfluxDB, starting a docker SSH terminal inside Influx, would round up this blog. I've done this during installation and it works w/o any problems.

Telegraf setup
Looking at the CLI example and comparing it with some official sources, I noticed that port 8092 is of type UDP, hence I guess the appropriate option should read: -p 8092:8092/udp

Grafana setup
I tried to follow your CLI example to setup Grafana. Instead of docker create -d... I had to use docker create run -d...
Don't ask me why this differs, but obviously the run option worked for me. Since the Grafana docker was not registered on my Synology, this command also invoked a download of the lastest container, too.

Right now, I'm stuck at the point the Grafana docker protocol throws some errors, that it cannot access /var/lib/grafana. Of course the path /volume1/docker/grafana is available.
I had this once before, when setting up another container and solved this by creating a new Syno user, extracting its GID and UID and add those values to the docker environment vars. However, it seems that Grafana docker does not give me this option.

Anyway, great blog, it was easy to follow in parts when googling some more info. But doing so you will learn a lot about docker, CLI and much more.

Perhaps, after reading my lines above, you could use them to add some more information to your blog.

If you have got some info about the access issue I'm facing with Grafana, I would be very glad. I did not google so far yesterday since it was already too late in the evening.

Bye,
Michael
 

Rusty

Staff member
Moderator
NAS Support
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Thank you for your notes and pointers. Truth is that this tutorial was not targeted for absolute begginers or Docker begginers as well, but I will try and work around those edits and updates when I get the time.

Thank you again.
Now regarding your problem:
Right now, I'm stuck at the point the Grafana docker protocol throws some errors, that it cannot access /var/lib/grafana. Of course the path /volume1/docker/grafana is available.
This is probably because since version 6.x grafana is using UID/GID: 472, so you will have to work around to provide that user and group access on your nas to the target map volume /var/lib/grafana/.

Considering its sandboxed in my setup I just have everyone read permissions on that folder to not mess around with it but I'm almost 99% sure thats your problem.
 

Micky

Byte Poster
NAS
DS918+, DS916+, DS214+, DS211j
Truth is that this tutorial was not targeted for absolute begginers or Docker begginers...
I thought so, however, even with this in mind some details are missing :p Anyway, hope you don't bother for me having posted such a long feedback. This is certainly not for complaining about the blog posting but maybe for an improved version 2 of the blog!

Considering its sandboxed in my setup I just have everyone read permissions on that folder to not mess around with it but I'm almost 99% sure thats your problem.
Thanks, will check later today and report back!

cu,
Michael
 
Last edited:

Rusty

Staff member
Moderator
NAS Support
www.blackvoid.club
NAS
DS412+, DS718+, DS918+, 2x RS3614RPxs+ with expansions
Router
RT1900ac, RT2600ac, MR2200ac
Anyway, hope you don't bother for me having posted such a long feedback
Not at all. In fact thank you for your feedback and thoughts.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for all who likes NAS related topics.

Registration is free, easy and fast!

Top