Possible to update Synology MIBs?

Tags: #<Tag:0x00007f6cb59d92b0>

As a newbie here not sure if this is the correct location to post this request… Apologies if wrong place.

I noticed that all my Synology devices were missing memory details. So after going through discovery and MIBs files I noticed that Synology MIBs have not been updated since 2013 and are missing quite a few entries that have been added since 2013.

The latest MIBs details for Synology can be found here:

Would it possible to get them updated?

Hello @heinanr

Updating the MIB does not help directly. You have to identify which OIDs are missing. It is only MIBfile + OID discovery/polling that will actually display more data.

I would suggest that you add in this post the missing details you would like to see (OID name) and provide a direct link to the MIB file (in case necessary to update it)

Bye

Thanks for your reply.

snmpbulkwalk:
https://p.libren.ms/view/8d434c5a

And rest as I was allowed to post more than 2 links:

poller.php:
https://p.libren.ms/view/58f7805b

discovery.php:
https://p.libren.ms/view/82ed53e3

Memory is indeed supported on DSM. Nothing special should happen.
Seems that your LibreNMS instance is somehow broken :

SQL[[1;33mselect * from `mempools` where `mempools`.`device_id` = ? and `mempools`.`device_id` is not null [0;33m[3][0m 1.1ms] 
  
#0 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638): Illuminate\Database\Connection->runQueryCallback()
#1 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(472): Illuminate\Database\Connection->run()
#2 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(424): Illuminate\Database\Connection->statement()
#3 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Processors/Processor.php(32): Illuminate\Database\Connection->insert()
#4 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(2882): Illuminate\Database\Query\Processors\Processor->processInsertGetId()
#5 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1530): Illuminate\Database\Query\Builder->insertGetId()
#6 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1051): Illuminate\Database\Eloquent\Builder->__call()
#7 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1016): Illuminate\Database\Eloquent\Model->insertAndSetId()
#8 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(857): Illuminate\Database\Eloquent\Model->performInsert()
#9 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(262): Illuminate\Database\Eloquent\Model->save()
#10 /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php(274): Illuminate\Database\Eloquent\Relations\HasOneOrMany->save()
#11 /opt/librenms/LibreNMS/DB/SyncsModels.php(55): Illuminate\Database\Eloquent\Relations\HasOneOrMany->saveMany()
#12 /opt/librenms/LibreNMS/Modules/Mempools.php(57): LibreNMS\Modules\Mempools->syncModels()
#13 /opt/librenms/includes/discovery/mempools.inc.php(3): LibreNMS\Modules\Mempools->discover()
#14 /opt/librenms/includes/discovery/functions.inc.php(164): include('/opt/librenms/i...')
#15 /opt/librenms/discovery.php(116): discover_device()
#16 {main}
[0;31mError in mempools module.[0m SQLSTATE[42S22]: Column not found: 1054 Unknown column 'mempool_used_oid' in 'field list' (SQL: insert into `mempools` (`mempool_precision`, `mempool_index`, `mempool_type`, `mempool_descr`, `mempool_perc_warn`, `mempool_used_oid`, `mempool_total_oid`, `mempool_class`, `mempool_total`, `mempool_used`, `mempool_free`, `mempool_perc`, `device_id`) values (1024, 1, hrstorage, Physical memory, 99, .1.3.6.1.2.1.25.2.3.1.6.1, ?, system, 4079943680, 1485533184, 2594410496, 36, 3))

Could you manually run, as librenms user, ./daily.sh, and then ./validate.php and provide your results here ?

Thanks for looking into this issue.

Here is the output:

su librenms
[email protected]:~$ pwd
/opt/librenms
[email protected]:~$ ./daily.sh
Updating SQL-Schema OK
Cleaning up DB OK
[email protected]:~$ ./validate.php

Component Version
LibreNMS 21.2.0
DB Schema No Schema (0)
PHP 7.4.15
Python 3.8.5
MySQL 8.0.23
RRDTool 1.7.2
SNMP NET-SNMP 5.8

====================================

[OK] Composer Version: 2.0.11
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[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, 16 Feb 2021 04:52:41 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN] Your local git branch is not master, this will prevent automatic updates.
[FIX]:
You can switch back to master with git checkout master
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
composer.json
[FAIL] We have found some files that are owned by a different user than librenms, this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/ssl

librenms_synology_memory
Memory usage is not showing any values for some reason.

Hi @heinanr
It seems that you have a lot of issue on your LibreNMS install. daily.sh is not running regularly, you are not up-to-date, you have database issues, and you have some modified files.
We encourage you to fix all of those issues. And after, run a new discovery of your DSM device.
This version of Synology DSM works perfectly and provides all the memory values to a working LibreNMS instance.

I’m running it in a docker (https://github.com/jarischaefer/docker-librenms) hence some of the directories are mounted outside the docker so that I will not lose the data when upgrading.

Running daily.sh manually didn’t fix things.

I don’t see how running it in docker would selectively prevent memory details only not being shown properly but something I will need to look into in more details.

Anyway thanks for your help.

If I figure out the root cause, I’ll post details here.

I don’t use docker at all, so you’ll probably need to wait for somebody who does for more details. But Docker or not, Memory should be displayed for DSM for sure. And your validate shows that things must be fixed in your setup.

OK I fixed it.

I decided to setup another docker instance for libreNMS and made sure I followed instructions accurately. It is now showing memory tables/stats for all the devices.

Thanks for your time @PipoCanaja, much appreciated for pointing me the right direction.

I’m not 100% sure why the first container had issues, but I suspect I might have forgotten to run “docker exec librenms setup_database” command or maybe it didn’t finish running when setting up the admin user (or at least do not remember running it at the time).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.