Synology SNMP Network Monitoring with LibreNMS Docker

Originally published at:

Synology SNMP Monitoring with LibreNMS Tutorial for installing LibreNMS on Synology NAS via Docker to monitor SNMP enabled network devices Update Aug 30, 2019 Tutorial updated to latest working steps and versions DSM 6.2.2-24922 Update 2 LibreNMS – 1.54 MariaDB – 10.4.7-MariaDB-1:10.4.7+maria~bionic Updated screenshots Re-arranged/deleted some old bloggy content Post split up to three pages…

If you found this tutorial to be useful, your comments or :orange_heart: are most appreciated!
Stuck and need help/pointers with this tutorial? Comment in the forum powered by Discourse

1 Like

Just came back ONCE AGAIN to use your Guide, as i’ve been getting a dozen of customer’s on my own consulting company, where i do network, but dont understand databases.
now your Librenms/MariaDB guide just gave me a little something xtra to use when it comes to monitoring.
im not relying on the tool as im a sole beginner on this platform, so im using it and the Dessert when it comes to monitoring customer’s device health :slight_smile:
Thank you so much for using this guide.!

once AGAIN im thanking you

1 Like

Hi Morten! You’re the first in the forums! Welcome and thank you for commenting!

Glad it worked out on your end! :slight_smile:

A user on my discord server shared that he’s using Telegraf to monitor his servers etc. If you need more details than relying on SNMP, Telegraf agent should be next on your list (Mine too :laughing:) to check out.

It’s a full stack so you will need a collector, database for long term data, and graphs

No sweat man. i just love the fact that you did the guide…
now i just need to “learn” how to upgrade librenms and mariadb when there is a docker upgrade available. ::slight_smile:

Im 110% invested in Ubiquiti Unifi and i got a total of 40 customer’s sites… multiple Site-2-Site-VPN and multiple VPN server’s running on those devices all around…
my next step is to get Influx/Grafana installed(might as well install everything i want before diving into the functions of every program) so its ready for use when i got the time.

but Telegraf? hmm i though it was just another NMS program like Librenms? but apparantly its just a collector? So its somekind of an “agent”? collecting data, and then just putting the data into a database? so the data is ready to be pulled/shows by whatever program you wished to use like grafana or something else?

I don’t usually upgrade the MariaDB, it stays the same version for-almost-ever unless a security loophole is present… as for the LibreNMS upgrade, you can refer to my guide page 2 for the upgrade steps.

So far I’ve encountered problems during an upgrade is major versions like a jump from the previous 1.4 to 1.6.

I would recommend going the non-Docker way for LibreNMS for your setup. At least for the main server, the rest of the distributed pollers can be run as a container

Yep, it’s another full stack alternative to Influx/Grafana… I’ve seen these two solutions floating around the homelab scene, but never tried them yet though!! So I’m not sure which works best or preferences for your scenario.

Since you are going the Grafana way, there’s also netdata agent alternative

So many choices :thinking: :thinking:

Too many choices… its a blessing but also a curse in this world of IT… :slight_smile:

Have you ever seen an issue where trying to add the synology device to Librenms where its also installed on failes?

Im getting a Ping/add error when trying to add the synology device that librenms is installed on.
if i try to add 2 other synology server on the same network= no problems…
so im guessing its something to do with the docker local/virual ports being used in that way, that some how makes it fail.
do you think it would be smarter to make the docker container use the physical host network instead of a “bridged” connection?

and have you ever seen a Librenms “error drawing graphs”… :slight_smile:?

Not really, for docker it just means it’s going to open up all ports if you run it as host. If security is of concern, I would just leave it as bridge, that way only your local can write into the MariaDB (since we expose only the LibreNMS 8668 GUI)

Eg: your other Syno devices are on local 192.168 subnet

If you are bridging , you need to add the docker gateway which is your Synology device. Default it’s range , you can grep your docker gateway IP, that would be your Syno device. Try adding

If that fails, trying checking your Syno firewall to allow from local subnet

Not sure what you mean here, is it a graph but shows “error drawing” or an error that appears on the page/logs ?

apparantly i had to give it some time to populate the graph’s . everything is working after i let it reconsider through the night :slight_smile:

Ok the graphs is settled :sweat_smile:

The bridge network here is your Docker network layer behind your Syno host

I have the same problem as well initially when trying to add the Syno host hosting the LibreNMS

Packets > Syno > Docker Layer

since you are on Local Docker Layer trying to add SNMP on the Syno host

LibreNMS (Eg: > Docker Layer/Gateway ( > Syno (

Try running this command in your Syno Terminal (not the container bash) hosting the LibreNMS to get your current Docker bridge layer network subnet. By default, it should point to instead of 172.16 which is your local network outside of the Docker Layer

docker inspect bridge | grep 'Gateway'

Hey @Morten_Skandshus , just checking in, did you manage to add your local syno host? :grin:

Hi Jason. Not yet… ive been so busy i havent had the time yet to take a look at it.
since im not a great Docker/librenms expert i need several hours available before i can dive into it so i can learn :wink: But if you wanna take a quick look and make a little buck, let me know :wink:

ive started hosting a lot of server this week for customer so i might as well get those added to Librenms too, but right now im doing it on an IP address level, which will get confusing once i get added a ton of devices :slight_smile: the host synology can ping dns names without a sweat but apparantly the bridge thing here is messing with me again :slight_smile:

Hope youre enjoying the weekend man.

1 Like

Hi @jasonloong, firstly thanks so much for such detailed steps, I carefully followed them and am now successfully monitoring my NAS and Unifi devices.

One curious problem though, I’m hoping you could point me in the right direction. I can’t seem to do anything with dashboards, either adding a dashboard or adding a widget to the default dashboard. Any action just throws an unhelpful blank error box, with nothing showing in any logs.

This screenshot was after I simply tried to resize the placeholder widget.


Any ideas?

Hi Richard @rnlgreen and welcome to the forums :grin:

Hmmmm, I seem to recall having that problem before… let me deploy a fresh one to test on my Syno… will get back to you soonest

bad news… i got it working on my end :sweat_smile:

fresh install, no changes, with default admin login


Browsers tested:
Chrome Version 81.0.4044.129 (Official Build) (64-bit)
Safari Version 13.1 (15609.
Firefox 75.0 (64-bit)

Further research

Top Right Gear Icon / Settings > Global > [tab] System > Server

I ran a test librenms on port 8669, as per tutorial, yours should be 8668. This shouldn’t be a problem as the owner’s image has set proper config linking to our initial
-e BASE_URL=http://NAS.IP:8668 \

As a last resort, try restarting both containers

docker restart mariadb && docker restart librenms

Last step, run these to validate your install in general, might just be able to fix it…

Instructions are on the page 2 of my tutorial

(under root, ignore the screenshot / su - librenms)

docker exec -it librenms bash
source /etc/librenms_environment
cd /opt/librenms
php validate.php

and then copy/paste LibreNMS’s output and instructions for the permissions (ignore the setfcl errors)

Let me know if this helped…

Hay @jasonloong, thanks for spending time looking into this. Good news, I have it working now! Bad news, I’m not entirely sure what actually fixed it :confused: Don’t you hate it when that happens?

For info, here’s all I get now from validate.php, but as I say now happily creating custom dashboards.

Component | Version
--------- | -------
LibreNMS  | 1.63
DB Schema | 2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
PHP       | 7.4.5
MySQL     | 10.4.12-MariaDB-1:10.4.12+maria~bionic
RRDTool   | 1.7.0
SNMP      | NET-SNMP 5.7.3

[OK]    Composer Version: 1.10.5
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[WARN]  IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN]  Your install is over 24 hours out of date, last update: Tue, 28 Apr 2020 03:52:42 +0000
        Make sure your cron is running and run ./ by hand to see if there are any errors.
[WARN]  Your local git branch is not master, this will prevent automatic updates.
        You can switch back to master with git checkout master

Glad it worked! And thank you for reporting in!
Can’t agree anymore on weird errors…

Another FYI, the current GUI framework LibreNMS uses allows max 10 widgets for the dashboard

Didn’t know about that till I researched your problem :joy:

Seems like a great doc, unfortunately once I do the initial mariadb container install, the container goes into a continuous restart cycle. This is the first and only container install I’ve done on this NAS. I’ve removed and tried now three times with the same result each time.

Hi @beaker and welcome to the forums

Could you paste your MariaDB docker run code here and system specs if non-916+ :slightly_smiling_face:

@beaker sorry for the second ping, forums was down during a misconfig on pfSense on my end, making sure email get sent to you