newdevice: Added support for Cisco APIC devices (#5236)

This commit is contained in:
Neil Lathwood
2016-12-28 22:22:29 +00:00
committed by Søren Rosiak
parent 3264fa5896
commit cfddc11e76
5 changed files with 91 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
os: apic
group: cisco
text: 'Cisco APIC'
type: network
icon: cisco
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'CPU Usage' }
- { graph: device_temperature, text: 'Temperature' }
poller_modules:
cisco-cbqos: 1
cisco-cef: 1
cisco-mac-accounting: 1
cisco-voice: 1
cisco-remote-access-monitor: 1
cisco-sla: 1
cisco-ipsec-flow-monitor: 1
cipsec-tunnels: 1
cisco-otv: 1
discovery_modules:
cisco-cef: 1
cisco-sla: 1
cisco-mac-accounting: 1
cisco-otv: 1
cisco-pw: 1
cisco-vrf: 1
cisco-vrf-lite: 1

View File

@@ -0,0 +1,28 @@
<?php
/**
* apic.inc.php
*
* LibreNMS os discovery module for Cisco APIC
*
* 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>
*/
if (starts_with($sysObjectId, '.1.3.6.1.4.1.9.1.2238')) {
$os = 'apic';
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* apic.inc.php
*
* LibreNMS os poller module for Cisco APIC
*
* 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($version, $hardware, $serial) = explode(';', $poll_device['sysDescr']);
$version = preg_replace('/APIC VERSION /', '', $version);
$serial = preg_replace('/Serial /', '', $serial);

View File

@@ -152,6 +152,11 @@ class DiscoveryTest extends \PHPUnit_Framework_TestCase
$this->checkOS('apc', 'apc-embedded-powernet');
}
public function testApic()
{
$this->checkOS('apic');
}
public function testAreca()
{
$this->checkOS('areca');

View File

@@ -0,0 +1,2 @@
1.3.6.1.2.1.1.1.0|4|APIC VERSION 1.2(3h); PID APIC-SERVER-M1; Serial xxxxxxxxxxx
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.9.1.2238