mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added support for Cisco APIC devices (#5236)
This commit is contained in:
committed by
Søren Rosiak
parent
3264fa5896
commit
cfddc11e76
27
includes/definitions/apic.yaml
Normal file
27
includes/definitions/apic.yaml
Normal 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
|
||||
28
includes/discovery/os/apic.inc.php
Normal file
28
includes/discovery/os/apic.inc.php
Normal 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';
|
||||
}
|
||||
29
includes/polling/os/apic.inc.php
Normal file
29
includes/polling/os/apic.inc.php
Normal 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);
|
||||
@@ -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');
|
||||
|
||||
2
tests/snmpsim/apic.snmprec
Normal file
2
tests/snmpsim/apic.snmprec
Normal 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
|
||||
Reference in New Issue
Block a user