Installing LibreNMS on Mikrotik Router Container - next steps

I am on a quest to install a bandwidth monitor that will live in a container(s) on my Mikrotik Router.

For the project I am using a RB5009, but ultimately plan to run these on Mikrotik HAP AX3, to help some friends and family to have some more info on their home network than just the basic graphs Mikrotik supply.

So, after quite a bit forwards and backwards on Mikrotik forums, LibreNMS was one of the solutions put forward, and overall feedback on LibreNMS is also quite good.

At the moment the status quo is that librenms/librenms:latest is up and running, as well as MariaDB. Each in it’s own container.

More info on steps etc here (Containerized SNMP monitoring (short term) - a step above built-in graphs - MikroTik)

I am new to LibreNMS, so would like to get some pointers and suggestions as to where to go next.

I am currently able to log on to LibreNMS, and add devices (so, the DB connection is also working)

However, I can see there is no automated polling / discovery.

The plan is for a relatively basic system advising which Wifi Access Points on my LAN is up / down, and how much each of these are generating in terms of traffic. Also, most importantly, how much of my internet capacity is being used.

Thus, because of the relatively basic requiremens, and the need to keep it super lightweight, I need some guidance from all of you here on this forum please.
[I do not want to end up with too many sidecars (just essentials to get it working)

At this point in time it seems I need a polling mechanism, and timing it o execute according to a schedule.

It seems CRON is replaced by a sidecar ?Dispatcher? service, which in turn seems to be dependant on a Redis service… Quite a bit for a newbie to take in.

So, my questions to you all are:

  1. How do I keep it as lightweight as possible, but able to do the basics (in containers)?
  2. Assistance to try and get it all working on the Mikrotik platform (slightly different container implementation)
  3. Best practices advise.

My validate.php results

ConfigurationOk

DatabaseFailure

OK: Database Schema is current

OK: SQL Server meets minimum requirements

OK: lower_case_table_names is enabled

OK: MySQL engine is optimal

OK: Database and column collations are correct

OK: Database schema correct

FAIL: Time between this server and the mysql database is off Mysql time 2023-11-23 11:40:59 PHP time 2023-11-23 13:40:59

DependenciesOk

DiskOk

DistributedpollerOk

MailOk

PhpOk

PollerFailure

FAIL: No active polling method detected

OK: Dispatcher Service not detected

OK: Locks are functional

FAIL: No python wrapper pollers found

OK: Redis is unavailable

ProgramsFailure

INFO: fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1

FAIL: /usr/sbin/fping could not be executed. /usr/sbin/fping must have CAP_NET_RAW capability (getcap) or suid. Selinux exclusions may be required. (/usr/sbin/fping: can’t create socket (must run as root?))

FAIL: /usr/sbin/fping should have CAP_NET_RAW!

Fix:

setcap cap_net_raw+ep /usr/sbin/fping

INFO: fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1

FAIL: /usr/sbin/fping6 could not be executed. /usr/sbin/fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exclusions may be required. (/usr/sbin/fping: can’t create socket (must run as root?))

FAIL: /usr/sbin/fping6 should have CAP_NET_RAW!

Fix:

setcap cap_net_raw+ep /usr/sbin/fping6

PythonFailure

FAIL: Python3 module issue found: ‘’

Fix:

pip3 install -r /opt/librenms/requirements.txt

RrdOk

RrdcheckOk

SchedulerOk

SystemOk

UpdatesWarning

WARN: Non-git install, updates are manual or from package

UserOk

WebserverFailure

FAIL: ServerName is set incorrectly for your webserver, update your webserver config. 172.xxx.1.6 parse failure (/validate/results)

Fix:

ServerName 172.xxx.1.6

Thanks in advance

I’d focus on just getting things running first, no issues with running cron so just set that up if you don’t want to use redis.

When I enabled scehduling, the router rebooted.

I thought it was a once-off, so repeated the enabling, and it rebooted again.

As my schedule is quite tight at the moment, I will leave this project a bit until I am on leave.

It seems like a solution that can work, but my knowledge level is too low at present, so learning curve a bit steep while dealing with pre-holiday work madness

Update.

There was just too many issues, and this caused a number of router reboots. Also, The LibreNMS ecosystem is completely new to me, so if I decided to continue, it would have been a steep (and wide) learning curve for a small project (Learning the LibreNMS companents and Mikrotik containers)

As such, I retired the project with Grafana, Prometheus and SNMP-Explorer, and managed to get a perfectly working solution for my needs, and quite lightweight to boot.

Thanks for all the commentst and feedback here.

2 Likes