mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added additional support for Synology dsm (#5145)
This commit is contained in:
@ -7,6 +7,10 @@ if (starts_with($sysDescr, 'Linux')) {
|
||||
'syno_dyn_module',
|
||||
);
|
||||
|
||||
if (snmp_get($device, 'systemStatus.0', '-Osqnv', 'SYNOLOGY-SYSTEM-MIB', 'synology')) {
|
||||
$os = 'dsm';
|
||||
}
|
||||
|
||||
if (str_contains(snmp_get($device, 'HOST-RESOURCES-MIB::hrSystemInitialLoadParameters.0', '-Osqnv'), $init_params)) {
|
||||
$os = 'dsm';
|
||||
}
|
||||
|
@ -460,6 +460,7 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->checkOS('dsm');
|
||||
$this->checkOS('dsm', 'dsm-ds214');
|
||||
$this->checkOS('dsm', 'dsm-ds916');
|
||||
}
|
||||
|
||||
public function testEatonpdu()
|
||||
|
@ -127,6 +127,9 @@ function snmp_translate_number($oid, $mib = null, $mibdir = null)
|
||||
if ($oid == 'GAMATRONIC-MIB::psUnitManufacture.0') {
|
||||
return '1.3.6.1.4.1.6050.1.1.2.0';
|
||||
}
|
||||
if ($oid === 'SYNOLOGY-SYSTEM-MIB::systemStatus.0') {
|
||||
return '1.3.6.1.4.1.6574.1.1.0';
|
||||
}
|
||||
// end optimizations
|
||||
|
||||
if (preg_match('/^[\.\d]*$/', $oid)) {
|
||||
|
4
tests/snmpsim/dsm-ds916.snmprec
Normal file
4
tests/snmpsim/dsm-ds916.snmprec
Normal file
@ -0,0 +1,4 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Linux Syno 3.10.77 #8451 SMP Wed Nov 9 13:45:59 CST 2016 x86_6
|
||||
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 ihd_num=4 netif_num=2 HddHotplug=1 SataPortMap=23 sata_remap=0>2:1>3:2>0:3>1 acpi_enforce_resources=lax libata.for
|
||||
1.3.6.1.4.1.6574.1.1.0|4|1
|
Reference in New Issue
Block a user