mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Revert "Modified to pull from appropriate OID depending on sysObjectID" - typos in snmp_get_multi() commands
This reverts commit 5c2b6039f4.
This commit is contained in:
@@ -1,15 +1,9 @@
|
||||
<?php
|
||||
|
||||
if ($poll_device['sysObjectID'] == 'enterprises.10002.1') {
|
||||
if ($data = snmp_get_multi($device, 'dot11manufacturerProductName.0 dot11manufacturerProductVersion.0', '-OQUs', 'IEEE802dot11-MIB')) {
|
||||
$hardware = $data[0]['dot11manufacturerProductName'];
|
||||
if (preg_match('/(v[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/', $data[0]['dot11manufacturerProductVersion'], $matches)) {
|
||||
$version = $matches[0];
|
||||
}
|
||||
}
|
||||
} elseif ($poll_device['sysObjectID'] == 'enterprises.8072.3.2.10') {
|
||||
if ($data = snmp_get_multi($device, 'unifiApSystemModel.0 unifiApSystemVersion.0', '-OUQs', 'UBNT-UniFi-MIB')) {
|
||||
$hardware = $data[0]['unifiApSystemModel'];
|
||||
$version = $data[0]['unifiApSystemVersion'];
|
||||
}
|
||||
if ($sysmodel = snmp_get($device, 'unifiApSystemModel.0', '-Osqnv', 'UBNT-UniFi-MIB')) {
|
||||
$hardware = $sysmodel;
|
||||
}
|
||||
|
||||
if ($sysver = snmp_get($device, 'unifiApSystemVersion.0', '-Osqnv', 'UBNT-UniFi-MIB')) {
|
||||
$version = $sysver;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user