Change Qnap discovery to yaml (#5769)

This commit is contained in:
Tony Murray
2017-02-04 17:49:36 -06:00
committed by Neil Lathwood
parent c8ba28a1e3
commit dfb22b5d2a
3 changed files with 5 additions and 4 deletions

View File

@@ -8,3 +8,5 @@ over:
- { graph: device_mempool, text: 'Memory Usage' }
- { graph: device_storage, text: 'Storage Usage' }
processor_stacked: 1
discovery:
- sysObjectId: .1.3.6.1.4.1.24681

View File

@@ -5,9 +5,7 @@ if (starts_with($sysDescr, 'Linux') || starts_with($sysObjectId, '.1.3.6.1.4.1.8
$os = 'linux';
// Specific Linux-derivatives
if (str_contains(snmp_get($device, 'ENTITY-MIB::entPhysicalMfgName.1', '-Osqnv'), 'QNAP')) {
$os = 'qnap';
} elseif (starts_with($sysObjectId, array('.1.3.6.1.4.1.10002.1', '.1.3.6.1.4.1.41112.1.4')) || str_contains(snmp_get($device, 'dot11manufacturerName.5', '-Osqnv', 'IEEE802dot11-MIB'), 'Ubiquiti')) {
if (starts_with($sysObjectId, array('.1.3.6.1.4.1.10002.1', '.1.3.6.1.4.1.41112.1.4')) || str_contains(snmp_get($device, 'dot11manufacturerName.5', '-Osqnv', 'IEEE802dot11-MIB'), 'Ubiquiti')) {
$os = 'airos';
if (str_contains(snmp_walk($device, 'dot11manufacturerProductName', '-Osqnv', 'IEEE802dot11-MIB'), 'UAP')) {
$os = 'unifi';

View File

@@ -1,2 +1,3 @@
1.3.6.1.2.1.1.1.0|4|Linux
1.3.6.1.2.1.1.1.0|4|Linux hostname 4.2.2
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.24681
1.3.6.1.2.1.47.1.1.1.1.12.1|4|QNAP