newdevice: Added additional support for Synology dsm (#5145)

This commit is contained in:
Neil Lathwood
2016-12-18 21:17:26 +00:00
committed by GitHub
parent e7d0d1dd7d
commit ab29261f0c
4 changed files with 12 additions and 0 deletions

View File

@ -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';
}

View File

@ -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()

View File

@ -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)) {

View 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