mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added additional support for Synology DSM devices #2738
This commit is contained in:
committed by
Neil Lathwood
parent
980590b293
commit
521f3edd54
13
includes/discovery/os/dsm.inc.php
Normal file
13
includes/discovery/os/dsm.inc.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Synology DSM
|
||||
if (starts_with($sysDescr, 'Linux')) {
|
||||
$init_params = array(
|
||||
'syno_hw_version',
|
||||
'syno_dyn_module',
|
||||
);
|
||||
|
||||
if (str_contains(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'), $init_params)) {
|
||||
$os = 'dsm';
|
||||
}
|
||||
}
|
@@ -50,8 +50,6 @@ if (starts_with($sysDescr, 'Linux') && !starts_with($sysObjectId, $skip_oids)) {
|
||||
$os = 'sophos';
|
||||
} elseif (snmp_get($device, 'SFA-INFO::systemName.0', '-Osqnv', 'SFA-INFO') !== false) {
|
||||
$os = 'ddnos';
|
||||
} elseif (str_contains(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'), 'syno_hw_version')) {
|
||||
$os = 'dsm'; // Synology DSM
|
||||
} elseif (is_numeric(trim(snmp_get($device, 'roomTemp.0', '-OqvU', 'CAREL-ug40cdz-MIB')))) {
|
||||
$os = 'pcoweb'; // Carel PCOweb
|
||||
}
|
||||
|
@@ -442,6 +442,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
public function testDsm()
|
||||
{
|
||||
$this->checkOS('dsm');
|
||||
$this->checkOS('dsm', 'dsm-ds214');
|
||||
}
|
||||
|
||||
public function testEatonpdu()
|
||||
|
3
tests/snmpsim/dsm-ds214.snmprec
Normal file
3
tests/snmpsim/dsm-ds214.snmprec
Normal file
@@ -0,0 +1,3 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Linux xxxxx 3.2.40 #7393 SMP PREEMPT Thu Jun 2 19:47:23 CST 2016 i686
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
|
||||
1.3.6.1.2.1.25.1.4.0|4|root=/dev/md0 HddHotplug=1 ihd_num=2 netif_num=1 syno_dyn_module=n phys_memsize=1024 memmap=exactmap memmap=128K@128K memmap=711
|
Reference in New Issue
Block a user