newdevice: Add support for Array Networks ArrayOS #5257 (#5604)

* newdevice: Add support for Array Networks ArrayOS #5257

* preg_replace -> str_replace
This commit is contained in:
Neil Lathwood 2017-01-25 22:02:54 +00:00 committed by Tony Murray
parent 4d5d612704
commit 14a2d290ae
7 changed files with 3087 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,9 @@
os: arrayos
text: Array Networks
type: loadbalancer
icon: arraynetworks
discovery:
- sysObjectId:
- .1.3.6.1.4.1.7564
mib_dir:
- arraynetworks

View File

@ -0,0 +1,31 @@
<?php
/**
* arrayos.inc.php
*
* LibreNMS os polling module for Array OS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2016 Neil Lathwood
* @author Neil Lathwood <neil@lathwood.co.uk>
*/
list($hardware, $version) = explode(' - ', $poll_device['sysDescr']);
$hardware = str_replace('Hardware:', '', $hardware);
preg_match('/\.([0-9\.]+) /', $version, $matches);
$version = $matches[1];
$serial = snmp_get($device, 'serialNumber.0', '-Oqv', 'CA-SNMP-MIB8');

File diff suppressed because it is too large Load Diff

View File

@ -168,6 +168,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('arista_eos'); $this->checkOS('arista_eos');
} }
public function testArrayOS()
{
$this->checkOS('arrayos');
}
public function testArubaos() public function testArubaos()
{ {
$this->checkOS('arubaos'); $this->checkOS('arubaos');

View File

@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Hardware: Array APV 2600 Intel(R) Pentium(R) CPU - Software: ArrayOS Rel.APV.8.5.0.92 build on Tue Jun 28 16:20:47 2016
1.3.6.1.2.1.1.2.0|6|.1.3.6.1.4.1.7564