Synology SNMP Network Monitoring with LibreNMS Docker

Hi,
I’m trying to set up the SMTP Office 365 relay to send alerts, but it fails.
The configuration seems to be good, but obviously it’s wrongs.

Someone has had the same problem??
Thank you :sweat_smile:

Hi @alrodgir and welcome to the forums :slight_smile:

What is your setup like?

Check/Allow firewall going out for smtp port 587 on the host that you installed LibreNMS on

1 Like

I’m talking about librenms configuration.
My network admin is reviewing the firewall configuration, I’ll answer you ASAP about this config.

Erm…

which parts are you in control?

Router < > LibreNMS Host (Synology? Server? VM? Laptop? PC?)

If you have another SMTP server to try on, it would be great to filter out whether it is the settings, or network wide blockage

  1. Another SMTP server
    a) Fails
    Host/Network Problem
    b) Success
    Office365 config problem

If you are on Syno and firewall turned on, please make sure SMTP outgoing is allowed. If you have to ask an network admin… they might be blocks/policies in the network that you are unaware of.

When you click on Test Email, what error does LibreNMS returns you?

Oh, sorry for being so concise :sweat_smile:
My set up is so simply:
Synology NAS with Librenms docker.
The Synology firewall is off.
Moikrotik router.
All output traffic it’s allowed.

Maybe I can try with the Google SMTP server :thinking:

When I click the test I obtain this Captura3
But, if I configure a printer to alert directly, with the same config, the printer alert correctly.

1 Like

Ok now we are getting somewhere… :smiley:

It seems the auth returns error, so network is ok as it’s able to contact the smtp server

Try unchecking “Auto TLS” and test again

Yea, this test should help too if above doesn’t work

hi all, an update to recent test deployment of jarischaefer’s LibreNMS image,
its broken on both Synology and general Debian installs

Do NOT update to latest image

Do NOT update to latest image if you doing maintenance of your containers

Tested on:
Syno 916+
DSM 6.2.3-25426

Version 1.65.1 - Sat Jul 11 2020 03:56:16 GMT+0800
Database Schema 2020_06_23_00522_alter_availability_perc_column (170)
Web Server nginx/1.15.8
PHP 7.4.7
Python 3.6.9
MySQL 10.4.12-MariaDB-1:10.4.12+maria~bionic
Laravel 6.18.20
RRDtool 1.7.0

Discovery works but never polls after

Test with Ubuntu VM

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

Thought I’d test this image in a VM to cancel out some Syno permission problems to make sure the image is working

poller-wrapper.py error

Latest working version: 1.63

If anyone tested with the latest version and works, would appreciate if they could report with any work arounds/solutions :slight_smile:

For new users deploying a fresh install, I’ve tested from latest, v1.65, v.1.64, with poller-wrappy.py errors, please use v1.63

Version 	1.63 - Tue Apr 28 2020 11:52:42 GMT+0800
Database Schema 	2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
Web Server 	nginx/1.15.8
PHP 	7.4.5
MySQL 	10.5.4-MariaDB-1:10.5.4+maria~focal
RRDtool 	1.7.0

Eg:
docker pull jarischaefer/docker-librenms:1.63

Meanwhile I’ll go report to jarischaefer :sweat_smile:

Tutorial updated to working :slight_smile:

Details are on the tutorial changelog


Github Issue details:

Latest working, testing, Docker deployment of LibreNMS (fresh install)

MariaDB

docker run \
-v /volume1/docker/mariadb:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=root_password \
-e TZ=Asia/Singapore \
--name mariadb \
-d \
--restart always \
mariadb:latest \
--innodb_file_per_table=1 \
--lower_case_table_names=0

LibreNMS

docker run \
-p 8668:80 \
-e DB_HOST=libredb \
-e DB_NAME=librenms \
-e DB_USER=librenms \
-e DB_PASS=libre_password \
-e APP_KEY=base64:THE_GENERATED_KEY \
-e BASE_URL=http://YOUR_NAS_IP:8668 \
-e TZ=Asia/Singapore \
--link mariadb:libredb \
-v /volume1/docker/librenms/logs:/opt/librenms/logs \
-v /volume1/docker/librenms/rrd:/opt/librenms/rrd \
-v /volume1/docker/librenms/custom.config.php:/opt/librenms/conf.d/custom.config.php:ro \
--name librenms \
-d \
--restart always \
jarischaefer/docker-librenms:latest

Good morning!

Wanted to say i appreciate your librenms setup guide very much. I had setup librenms before the July upgrade. I am trying to fix it. I recreated both containers using the new variables. The polling issue seems to be fixed but my graphs still don’t show up. Here is a screenshot of my mariadb container. I read your ticket with jari and the innodb + lower case values fixed your issues. Theyr don’t seem to work for me. Running on synology docker. Thanks for the help and good work!

Hi @fatbob01and welcome to the forums :slight_smile:

I am assuming no issues previously for both poller and graphs, let me know if that’s not the case

Have you tried to validate the installation after pulling the new image?? (Page 2 of tutorial)

The validation should tell you to run ./lnms migrate (In Docker bash)

If you run into problems don’t forget to copy/paste or screenshot the logs (you can safely ignore the setfcl errors as Synology does not have setfcl)

This is what I get following a config validation. I tried the suggested fixes mentioned in the screenshot but no dice

Thank you for the validation screenshot.

Hm… :thinking: everything seems to work fine from the validation

Which version are you using, and are you updating to latest libre?

I’ve recently updated to 1.67 from 1.66, you should see ./lnms migrate during validation

You might need to setup a second deployment of my tutorial steps from scratch to see whether it works, as I didn’t upgrade from before the new alias/db options. I suspect there might be database mismatches that point to invalid RRD links, thus the missing graphs…

(Do note that this deletes the device RRD graphs) If you have a not-so-important device, could you try to remove that device from LibreNMS and add it back again to see whether the graphs show up?

If you wish to keep the current data, I would recommend setting up a second set of librenms/mariadb with different port. eg: 8669 , and see whether the deployment works from the beginning

Great tutorial, do you also have something how to get de agent (check_mk) to work?

Hi @big_bud and thank you :slight_smile:

Hmm not too sure as I have never used the agent

How far have you been on their docs?? https://docs.librenms.org/Extensions/Agent-Setup/

Agent etc is working but cannot connect to the docker container I think. Need to recreate the container with port 6556 also added but I’m not very sure.

Hm, TCP-6556 is FROM the librenms, so you don’t need to open ports on the container side, you would need to check firewall and allow TCP-6556 on the device with the agent.

I came across this: Hi everyone! Question about LibreNMS and the check_mk agent - LibreNMS Community

I would do the following:

  1. Ensure firewall allow on the device with agent
  2. In librenms, under the device with agent, Settings > Modules > Enable Unix Agent (Left of page)
  3. You have to manually allow the apps/modules that you want to monitor on. Application Docs / Agent
  4. On same device page, 3 dots (beside Settings/Gear Icon) , click on Capture, under Discovery, click Run. Check for check_mk logs (screenshot: LibreNMS and Raspberry Pi - #3 by jasonloong)
  5. Do same as above for Poller, and check logs on the check_mk/unix agent

If that still does not work

  1. You have to manually check the scripts provided and make sure they point to correct bin PATH if non-standard Linux like FreeBSD
  2. If Windows: make sure firewall is allowed

Hope that helps :thinking: Let me know if that worked out!

I am going through this tutorial now. I see in the tutorial, you are running MariaDB in another Docker container. However, I already have a MariaDB set up on my Synology.

I see the line below:

–link mariadb:libredb \

I see that creates a link from the MariaDB container to the LibreNMS container. If I don’t need this link, how could I modify this command? Or can I just remove it?

Hi @JasterMereel

Yes, please remove the –link mariadb:libredb \ , as it is a convenience command to “link” hostname of “libredb” to another container called “mariadb” which was created in the tutorial

For your case, you should update -e DB_HOST=SYNO.IP \ and other SQL credentials to your MariaDB settings on Syno

-e DB_NAME=librenms \
-e DB_USER=librenms \
-e DB_PASS='libre_password' \

Please also update the permissions on the Syno MariaDB to allow access from the container

Would that be accomplished with this command?

GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'%';

Yes, if you have a different username created for librenms, please update the command accordingly

1 Like