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:
neg2led
2018-01-04 15:15:07 +11:00
parent 5c2b6039f4
commit bccf301a8b

View File

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