Commit version 24.12.13800
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Observium
|
||||
*
|
||||
@ -7,8 +6,7 @@
|
||||
*
|
||||
* @package observium
|
||||
* @subpackage poller
|
||||
* @author Adam Armstrong <adama@observium.org>
|
||||
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
|
||||
* @copyright (C) Adam Armstrong
|
||||
*
|
||||
*/
|
||||
|
||||
@ -17,19 +15,14 @@
|
||||
// sysDescr.0 = STRING: "MyPower S3100-28TP"
|
||||
// sysDescr.0 = STRING: "MyPower S3100-9TC"
|
||||
// sysDescr.0 = STRING: "Switch"
|
||||
//if (preg_match('/^(MyPower .*)/i', $poll_device['sysDescr'], $matches))
|
||||
//{
|
||||
// $hardware = $matches[1];
|
||||
//}
|
||||
|
||||
if (!$hardware || !$version) {
|
||||
// .1.3.6.1.4.1.5651.1.2.1.1.2.2.0 = STRING: "MyPower S3200-10TP V6.2.3.10"
|
||||
$somemaipustr = snmp_get($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.2.0', '-OQv');
|
||||
if (preg_match('/^(MyPower [A-Z0-9-]*) (V[0-9\.]*)/i', $somemaipustr, $matches))
|
||||
{
|
||||
$hardware = $matches[1];
|
||||
$version = $matches[2];
|
||||
if (preg_match('/(?<hardware>MyPower \w\S+)( (version|V)\s*(?<version>[\d\.]+))?/i', snmp_get_oid($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.2.0'), $matches)) {
|
||||
if ($matches['hardware']) { $hardware = $matches['hardware']; }
|
||||
if ($matches['version']) { $version = $matches['version']; }
|
||||
}
|
||||
}
|
||||
|
||||
$serial = snmp_get($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.19.0', '-OQv');
|
||||
$serial = snmp_get_oid($device, '.1.3.6.1.4.1.5651.1.2.1.1.2.19.0');
|
||||
|
||||
// EOF
|
||||
|
||||
Reference in New Issue
Block a user