Fix os additional information for some that were broke (#9466)

* Fix os additional information for several OS.
$poll_device is not available, use $device

* fix draytek test data
This commit is contained in:
Tony Murray
2018-11-27 21:31:26 -06:00
committed by GitHub
parent 9a5ac514a5
commit dc8647697f
7 changed files with 8 additions and 8 deletions

View File

@@ -10,7 +10,7 @@
*/
$version = $poll_device['sysDescr'];
$version = $device['sysDescr'];
$cnpilot_data = snmp_get_multi_oid($device, 'cambiumAPSerialNum.0 cambiumAPHWType.0', '-OUQs', 'CAMBIUM-MIB');
$hardware = $cnpilot_data['cambiumAPHWType.0'];

View File

@@ -3,7 +3,7 @@
* draytek.inc.php
* @author Jason Cheng <sanyu3u@gmail.com>
*/
preg_match('/Router Model: ([\w ]+), Version: ([\w\.]+)/', $poll_device['sysDescr'], $tmp_draytek);
preg_match('/Router Model: ([\w ]+), Version: ([\w\.]+)/', $device['sysDescr'], $tmp_draytek);
$hardware = $tmp_draytek[1];
$version = $tmp_draytek[2];
unset($tmp_draytek);

View File

@@ -12,7 +12,7 @@ if (strpos($version, '.')) {
} else {
// Brocade NetIron CER, Extended route scalability, IronWare Version V5.6.0fT183 Compiled on Mar 27 2015 at 02:13:25 labeled as V5.6.00fb
// Brocade MLXe (System Mode: XMR), IronWare Version V5.6.0gT163 Compiled on Aug 27 2015 at 23:23:54 labeled as V5.6.00g
preg_match('/IronWare Version (.*) Compiled on/', $poll_device['sysDescr'], $regexp_result);
preg_match('/IronWare Version (.*) Compiled on/', $device['sysDescr'], $regexp_result);
$version = $regexp_result[1];
$version = str_replace('V', '', $version);
}

View File

@@ -2,6 +2,6 @@
use LibreNMS\RRD\RrdDefinition;
$version = $poll_device['sysDescr'];
$version = $device['sysDescr'];
$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CAMBIUM-PTP500-V2-MIB"));
$hardware = 'PTP 500 '. $masterSlaveMode;

View File

@@ -24,6 +24,6 @@
*/
use LibreNMS\RRD\RrdDefinition;
$version = $poll_device['sysDescr'];
$version = $device['sysDescr'];
$masterSlaveMode = ucfirst(snmp_get($device, 'masterSlaveMode.0', '-Oqv', "CANOPY-SYS-MIB"));
$hardware = 'PTP 600 '.$masterSlaveMode;

View File

@@ -24,5 +24,5 @@
*/
use LibreNMS\RRD\RrdDefinition;
$version = $poll_device['sysDescr'];
$version = $device['sysDescr'];
$hardware = 'PTP 800';