Unable to call the corresponding mib file

Hi Librenms,

I’ve come across a strange problem. Could you offer me some ideas?

When I called ./ discovery.php-h 10.52.26.70 locally, I found that the mib file specified in os_detection/ruijie.yaml could not be invoked, but I could access those hardcoded mib nodes.

[Note] I got the above guess by executing sudo -u librenms lnms device:poll 10.52.26.70, that is, the mib nodes hardcoded in ruijie.yaml such as Hardware/OS Version/Serial can be obtained. But processors/mempools/storage need to invoke the contents of a mib file cannot be accessed.

root@ubuntu24:/opt/librenms# sudo-u librenms lnms device:poll 10.52.26.70

Starting polling run:

Hostname: 10.52.26.70

ID: 1

OS: ruijie

IP: 10.52.26.70

Load poller module core
Uptime: 1 week 2 days 6 hours 19 minutes

SNMP: 3/0.04 [s] MySQL: 4/4.70 [s] the RRD: 2/0.00 [s]

Runtime for poller module ‘core’: 0.0390 seconds with 157,296 bytes

Unload poller module core
Load poller module os
Location:

Hardware: 2.35

OS Version: S6500_RGOS 12.5(1)B0503

OS Features:

Serial: G1B3AMB002959

SNMP: 0/0.00 [s] MySQL: 0/0.00 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘os’: 0.0028 seconds with 200,008 bytes

Unload poller module os
Load poller module availability
1 day : 100%

1 week : 100%

4 weeks : 100%

1 year : 100%

SNMP: 0/0.00 [s] MySQL: 13/0.05 [s] the RRD: 5/0.00 [s]

Runtime for poller module ‘availability’: 0.0103 seconds with 63920 bytes

Unload poller module availability
Load poller module ipmi
SNMP: 0/0.00 [s] MySQL: 1/0.01 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘ipmi’: 0.0035 seconds with 105,176 bytes

Unload poller module ipmi
Load poller module sensors
SNMP: 0/0.00 [s] MySQL: 1/0.00 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘sensors’: 0.0013 seconds with 2064 bytes

Unload poller module sensors
Load poller module processors
SNMP: 0/0.00 [s] MySQL: 1/0.01 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘processors’: 0.0022 seconds with 62,216 bytes

Unload poller module processors
Load poller module mempools
SNMP: 0/0.00 [s] MySQL: 1/0.00 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘mempools’: 0.0016 seconds with 27136 bytes

Unload poller module mempools
Load poller module storage
SNMP: 0/0.00 [s] MySQL: 1/0.00 [s] the RRD: 1/0.00 [s]

Runtime for poller module ‘storage’: 0.0017 seconds with 20192 bytes

Unload poller module storage

...

My current revision at Fix ruijie device by ShiyanXu · Pull Request #18198 · librenms/librenms · GitHub . If I need to provide additional information, I will also be glad to do so.

The following is the content of./validate.php:

root@ubuntu24:/opt/librenms# sudo -u librenms ./validate.php

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

Component | Version

--------- | -------

LibreNMS 25.8.0 (2025-09-09T12:52:18+00:00)

DB Schema | 2025_07_29_025425_hr_device_table_add_type_default (354)

PHP: 8.3.6

Python: 3.12.3

Database: MariaDB 10.11.13-MariaDB 0 Ubuntu 0.24.04.1

RRDTool 1.7.2

SNMP: 5.9.4.pre2

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

[OK] Composer Version: 2.8.11

[OK] Dependencies up-to-date.

[OK] Database Connected

[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

[OK] MySQL and PHP time match

[OK] Active pollers found

[OK] Dispatcher Service not detected

[OK] Locks are functional

[OK] Python poller wrapper is polling

[OK] Redis is unavailable

[OK] rrd_dir is writable

[OK] rrdtool version ok

[WARN] Your install is over 24 hours out of date, last update: Tue, 09 Sep 2025 12:52:18 +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:

…

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
  • The output of ./validate.php

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | curl --data-binary @- https://paste.rs/
./poller.php -h HOSTNAME -r -f -d | curl --data-binary @- https://paste.rs/

If you need to post any text longer than a few lines, please use a “pastebin” service, we recommend using https://paste.rs/ or https://paste.sh/

It is detected correctly. that is all you really use that yaml file for.
If you want version/serial etc, you need to put stuff in os_discovery/ruijie.yaml
sensors are detected during the discovery process, not polling so your output is not helpful here.

Sorry… I posted the wrong log.

The specific use of mib node is in os_discovery/ruijie yaml, but my phenomenon is unable to call to the specified mib node (such as RUIJIE-MEMORY-MIB::ruijieMemoryPoolSize), But the number of hardware (hardware: 1.3.6.1.4.1.4881.1.1.10.2.21.1.2.1.9.1) hard-coded content can read…

The mibs file has been placed in mibs/ruijie.

The following is part of os_discovery/ruijie.yaml and part of the output for executing the discovery script:

root@ubuntu24:/opt/librenms# ls mibs/ruijie/
RUIJIE-ENTITY-MIB  RUIJIE-INTERFACE-MIB  RUIJIE-PROCESS-MIB
RUIJIE-FIBER-MIB   RUIJIE-MEMORY-MIB     RUIJIE-SYSTEM-MIB
root@ubuntu24:/opt/librenms# cat resources/definitions/os_detection/ruijie.yaml 
os: ruijie
text: 'Ruijie Networks'
type: network
icon: ruijie
over:
      - { graph: device_bits, text: 'Device Traffic' }
      - { graph: device_processor, text: 'Processor Usage' }
      - { graph: device_mempool, text: 'Memory Usage' }

mib_dir: ruijie
discovery:
    -
        sysObjectID:
            - .1.3.6.1.4.1.4881.1.

root@ubuntu24:/opt/librenms# cat resources/definitions/os_discovery/ruijie.yaml 

mib: RUIJIE-SYSTEM-MIB:RUIJIE-MEMORY-MIB:RUIJIE-ENTITY-MIB:RUIJIE-PROCESS-MIB:RUIJIE-INTERFACE-MIB:RUIJIE-FIBER-MIB
modules:
    os:
        hardware: .1.3.6.1.4.1.4881.1.1.10.2.21.1.2.1.9.1
        version: .1.3.6.1.4.1.4881.1.1.10.2.21.1.2.1.8.1
        serial: .1.3.6.1.4.1.4881.1.1.10.2.21.1.2.1.10.1
    mempools:
        data:
            -
                total: RUIJIE-MEMORY-MIB::ruijieMemoryPoolSize
                free: RUIJIE-MEMORY-MIB::ruijieMemoryPoolFree
                used: RUIJIE-MEMORY-MIB::ruijieMemoryPoolUsed
                warn_percent: RUIJIE-MEMORY-MIB::ruijieMemoryPoolWarning
                precision: 1024
                descr: 'Memory Usage'
    processors:
        data:
            -
              oid: ruijieNodeCPUTotalTable
              descr: '{{ $ruijieNodeCPUTotalName }}'
              value: ruijieNodeCPUTotal5min
              num_oid: '.1.3.6.1.4.1.4881.1.1.10.2.36.1.2.1.5.{{ $index }}'
...


root@ubuntu24:/opt/librenms# ./discovery.php -h 10.52.26.70
LibreNMS Discovery
10.52.26.70 1 ruijie 
#### Load disco module core ####
OS: Ruijie Networks (ruijie)
  

>> Runtime for discovery module 'core': 0.0340 seconds with 391168 bytes
>> SNMP: [1/0.01s] MySQL: [0/0.00s] RRD: [0/0.00s]  
#### Unload disco module core ####


#### Load disco module os ####
Location:   
Hardware: 2.35  
OS Version: S6500_RGOS 12.5(1)B0503  
OS Features:   
Serial: G1B3AMB002959  

>> Runtime for discovery module 'os': 0.1030 seconds with 652760 bytes
>> SNMP: [4/0.03s] MySQL: [0/0.00s] RRD: [0/0.00s]  
#### Unload disco module os ####


#### Load disco module ports ####
...........................................................

>> Runtime for discovery module 'ports': 1.0280 seconds with 67096 bytes
>> SNMP: [5/1.00s] MySQL: [60/0.16s] RRD: [0/0.00s]  
#### Unload disco module ports ####


#### Load disco module ports-stack ####

>> Runtime for discovery module 'ports-stack': 0.0530 seconds with 22272 bytes
>> SNMP: [1/0.04s] MySQL: [0/0.00s] RRD: [0/0.00s]  
#### Unload disco module ports-stack ####

Module [ xdsl ] disabled globally.


#### Load disco module entity-physical ####
..................................................................................................................................................................
>> Runtime for discovery module 'entity-physical': 12.8700 seconds with 828488 bytes
>> SNMP: [2/12.82s] MySQL: [1/0.01s] RRD: [0/0.00s]  
#### Unload disco module entity-physical ####

Module [ entity-state ] disabled globally.

Module [ isis ] disabled globally.


#### Load disco module processors ####
Caching data: os mempools processors sensors 
Host Resources:   
UCD Resources:   


>> Runtime for discovery module 'processors': 0.3400 seconds with 1831800 bytes
>> SNMP: [8/0.27s] MySQL: [2/0.01s] RRD: [0/0.00s]  
#### Unload disco module processors ####


#### Load disco module mempools ####
  

>> Runtime for discovery module 'mempools': 0.0660 seconds with -5256 bytes
>> SNMP: [3/0.03s] MySQL: [1/0.00s] RRD: [0/0.00s]  
#### Unload disco module mempools ####

The mib: node is not recommended, it is suggested to use fully qualified oid names below in the form of “MIB::oid”

FYI, all “mib:” does is allow you to resolve oid names without specifying the MIB below. It does not add any detection for anything.

Hello, sorry for the delayed response to your suggestions.

By executing ./discovery.php -d -h 10.52.24.86 and analyzing the details, I found the root cause of the issue.

The problem was that the RUIJIE-PROCESS-MIB I was using must depend on RUIJIE-SMI to work properly, which resulted in the inability to parse the MIB file correctly.

After I added the dependent file, it’s now working properly.

Thank you very much for your help.

I’m currently encountering some issues when outputting test information and am still working on resolving them.

I’d like to confirm with you whether the complete steps are as follows:


sudo -u librenms ./scripts/collect-snmp-data.php -h 10.52.24.86 -v ''

sudo -u librenms ./discovery.php -h 10.52.24.86

sudo -u librenms ./scripts/save-test-data.php -o ruijie -v ''

sudo -u librenms lnms dev:check

When I executed sudo -u librenms lnms dev:check unit --db --snmpsim, I encountered the following problem. May I ask how I should solve it?
I suspect there is an issue with the database in the current environment, but after consulting AI, I haven’t found a solution.

......
> @php artisan config:clear

   INFO  Configuration cache cleared successfully.  

> scripts/dynamic_check_requirements.py || pip3 install --user -r requirements.txt || :
/opt/librenms/scripts/dynamic_check_requirements.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  import pkg_resources
Running unit check... 
PHPUnit 11.5.33 by Sebastian Bergmann and contributors.

Error in bootstrap script: PDOException:
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
#0 /opt/librenms/tests/bootstrap.php(38): PDO->__construct()
#1 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Application.php(352): include_once('...')
#2 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Application.php(122): PHPUnit\TextUI\Application->loadBootstrapScript()
#3 /opt/librenms/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run()
#4 /opt/librenms/vendor/bin/phpunit(122): include('...')
#5 {main}
failed (0.60s)
PHPUnit 11.5.33 by Sebastian Bergmann and contributors.

Error in bootstrap script: PDOException:
SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
#0 /opt/librenms/tests/bootstrap.php(38): PDO->__construct()
#1 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Application.php(352): include_once('...')
#2 /opt/librenms/vendor/phpunit/phpunit/src/TextUI/Application.php(122): PHPUnit\TextUI\Application->loadBootstrapScript()
#3 /opt/librenms/vendor/phpunit/phpunit/phpunit(104): PHPUnit\TextUI\Application->run()
#4 /opt/librenms/vendor/bin/phpunit(122): include('...')
#5 {main}

Hi. I’ve resolved the previous issue, which was caused by the PHPUnit test script being denied access when trying to connect to the database as the root user. I fixed this by modifying /opt/librenms/.env.

Now I’m encountering a new problem that persists across two different environments. I suspect it might be related to the network environment in my region. Could you help take a look?

Every time I run sudo -u librenms lnms dev:check unit --db --snmpsim, once the progress bar exceeds 62%, failures start to appear slowly, and the entire process eventually fails (see image below).

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

Those are the os checks.

Try adding –os-modules-only and -f to your options.

Checking the developer docs instead of an LLM might save you some time: Getting Started - LibreNMS Docs