Hi everyone!
I’m a new user of LibreNMS. I have a network behavior management device that supports the SNMP protocol, which I tried to add to LibreNMS. After adding it, the system shows it as a generic Linux OS and fails to monitor the specific data I need. According to the official documentation Intro - LibreNMS Docs, custom operating system definitions should be possible.
I successfully added a new OS definition following the official guide, but for some reason, after some time, it reverts back to the default Linux status. It seems like the custom OS configuration isn’t persisting. Is there any additional configuration required to make it permanent? I’d appreciate your guidance.
New os file:
includes/definitions/sangfor-ac.yaml
os: sangfor-ac
text: 'Sangfor ac'
type: appliance
icon: sangfor-ac
group: sangfor
mib_dir: sangfor
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_mempool, text: 'Memory Usage' }
discovery:
-
sysObjectID:
- .1.3.6.1.4.1.35047.2.1
sysDescr_regex:
- '/^Linux AC/
includes/definitions/discovery/sangfor-ac.yaml
mib: SANGFOR-GENERAL-MIB:SANGFOR-GENERAL-AND-SSL-MIB
modules:
os:
sysDescr_regex: '/Linux .*(?<ac>AC[\d.]+).*/'
version: '.1.3.6.1.4.1.35047.2.1.1.7.0'
mempools:
data:
-
free: SANGFOR-GENERAL-MIB::sfSysFreeMemoryNoUnit
total: SANGFOR-GENERAL-MIB::sfSysTotalMemoryNoUnit
descr: 'Free MeM'
precision: 1
type: sangfor-mem
processors:
data:
-
oid: SANGFOR-GENERAL-MIB::sfSysCpuCostRate
num_oid: '.1.3.6.1.4.1.35047.1.3.0'
type: sangfor
precision: 1
sensors:
count:
data:
# user status
-
oid: SANGFOR-GENERAL-MIB::statusinfo
num_oid: '.1.3.6.1.4.1.35047.2.1.1.1.{{ $index }}'
value: SANGFOR-GENERAL-MIB::numOfCurOnLine
index: 'numOfCurOnLine.{{ $index }}'
descr: 'online users'
-
oid: SANGFOR-GENERAL-MIB::statusinfo
num_oid: '.1.3.6.1.4.1.35047.2.1.1.3.{{ $index }}'
value: SANGFOR-GENERAL-MIB::numOfCurOU
index: 'numOfCurOU.{{ $index }}'
descr: 'Cur ORGS'
-
oid: SANGFOR-GENERAL-MIB::statusinfo
value: SANGFOR-GENERAL-MIB::numOfSession
num_oid: '.1.3.6.1.4.1.35047.2.1.1.6.{{ $index }}'
index: 'numOfSession.{{ $index }}'
descr: 'Sessions'
state:
data:
# AC status
-
oid: SANGFOR-GENERAL-MIB::sfEnableDoubleHost
num_oid: '.1.3.6.1.4.1.35047.1.7.{{ $index }}'
descr: 'HA mode'
group: 'AC STATUS'
states:
- { value: 0, graph: 0, generic: 0, descr: disable}
- { value: 1, graph: 1, generic: 0, descr: enable}
event log
2025-03-03 20:02:17 system 192.168.1.101 OS Version: 13.0.62 -> 2.4.35.4-AC1.95 System
2025-03-03 20:02:17 system 192.168.1.101 Hardware: Generic x86 System
2025-03-03 20:02:17 system 192.168.1.101 Icon: images/os/generic.svg -> images/os/linux.svg System
2025-03-03 20:02:17 processors 192.168.1.101 Processor Removed: sangfor 0 Processor System
2025-03-03 20:02:16 system 192.168.1.101 Device type: appliance -> server System
2025-03-03 20:02:16 system 192.168.1.101 Linux AC 2.4.35.4-AC1.95 #57 SMP ?? 10?? 20 18:47:21 CST 2009 i686 i686 i386 GNU/Linux -> Linux AC 2.4.35.4-AC1.95 #57 SMP ?? 10?? 20 18:47:21 CST 2009 i686 i686 i386 GNU/Linux System
2025-03-03 20:02:16 system 192.168.1.101 Device OS changed: sangfor-ac -> linux System
2025-03-03 20:02:16 system 192.168.1.101 Device OS: sangfor-ac -> linux System
2025-03-03 14:42:16 system 192.168.1.101 Icon: images/os/generic.svg
2025-03-03 14:41:10 sensor 192.168.1.101 Sensor Added: state SANGFOR-GENERAL-MIB::sfEnableDoubleHost 0 HA mode System
2025-03-03 14:41:10 sensor 192.168.1.101 Sensor Added: count sangfor-ac numOfCurOnLine.0 online users System
2025-03-03 14:41:10 sensor 192.168.1.101 Sensor Added: count sangfor-ac numOfCurOU.0 Cur ORGS System
2025-03-03 14:41:10 sensor 192.168.1.101 Sensor Added: count sangfor-ac numOfSession.0 Sessions System
2025-03-03 14:41:09 processors 192.168.1.101 Processor Discovered: sangfor 0 Processor System
2025-03-03 14:41:07 system 192.168.1.101 Linux AC 2.4.35.4-AC1.95 #57 SMP ?? 10?? 20 18:47:21 CST 2009 i686 i686 i386 GNU/Linux -> Linux AC 2.4.35.4-AC1.95 #57 SMP ?? 10?? 20 18:47:21 CST 2009 i686 i686 i386 GNU/Linux System
2025-03-03 14:41:07 system 192.168.1.101 Device OS changed: linux -> sangfor-ac System
2025-03-03 14:41:07 system 192.168.1.101 Device OS: linux -> sangfor-ac System
2025-03-03 14:41:07 system 192.168.1.101 Device type: server -> appliance System
2025-03-03 14:41:07 system 192.168.1.101 OS Version: 2.4.35.4-AC1.95 -> 13.0.62 System
2025-03-03 14:41:07 system 192.168.1.101 Hardware: Generic x86 -> System
2025-03-03 14:41:07 system 192.168.1.101 Icon: images/os/linux.svg -> images/os/sangfor-ac.svg
/opt/librenms $ ./validate.php
===========================================
Component | Version
--------- | -------
LibreNMS | 25.1.0 (2025-01-21T07:15:30+08:00)
DB Schema | 2024_11_22_135845_alert_log_refactor_indexes (310)
PHP | 8.3.16
Python | 3.12.8
Database | MariaDB 10.11.10-MariaDB-ubu2204
RRDTool | 1.9.0
SNMP | 5.9.4
===========================================
[OK] Installed from the official Docker image; no Composer required
[OK] Database connection successful
[OK] Database connection successful
[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 is enabled
[OK] Locks are functional
[OK] No python wrapper pollers found
[OK] Redis is functional
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Updates are managed through the official Docker image
thank you very much