mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Change Qnap discovery to yaml (#5769)
This commit is contained in:
committed by
Neil Lathwood
parent
c8ba28a1e3
commit
dfb22b5d2a
@@ -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
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user