mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed Cisco Catalyst9x00 support (#10862)
* missing OID * version * tests * move CAT9k to IOSXE * move CAT9k to IOSXE * tests * tests * codeclimate
This commit is contained in:
@@ -18,6 +18,7 @@ discovery:
|
||||
sysDescr_except:
|
||||
- 'LINUX_IOSD'
|
||||
- 'IOS-XE'
|
||||
- 'IOSXE'
|
||||
- 'CAT3K_CAA'
|
||||
bad_ifXEntry:
|
||||
- cisco1941
|
||||
|
@@ -37,5 +37,6 @@ register_mibs:
|
||||
discovery:
|
||||
- sysDescr:
|
||||
- IOS-XE
|
||||
- IOSXE
|
||||
- LINUX_IOSD
|
||||
- CAT3K_CAA
|
||||
|
@@ -15,9 +15,12 @@ if (preg_match('/^Cisco IOS Software, .+? Software \([^\-]+-([^\-]+)-\w\),.+?Ver
|
||||
} elseif (preg_match('/Cisco Internetwork Operating System Software\s+IOS \(tm\) [^ ]+ Software \([^\-]+-([^\-]+)-\w\),.+?Version ([^, ]+)/', $device['sysDescr'], $regexp_result)) {
|
||||
$features = $regexp_result[1];
|
||||
$version = $regexp_result[2];
|
||||
} elseif (preg_match('/^Cisco IOS Software \[([^\]]+)\],.+Software \(([^\)]+)\), Version ([^, ]+)/', $device['sysDescr'], $regexp_result)) {
|
||||
$features = $regexp_result[1];
|
||||
$version = $regexp_result[2] . " " . $regexp_result[3];
|
||||
}
|
||||
|
||||
$oids = ['entPhysicalModelName.1', 'entPhysicalContainedIn.1', 'entPhysicalName.1', 'entPhysicalSoftwareRev.1', 'entPhysicalModelName.1001', 'entPhysicalContainedIn.1001', 'cardDescr.1', 'cardSlotNumber.1'];
|
||||
$oids = ['entPhysicalModelName.1', 'entPhysicalContainedIn.1', 'entPhysicalName.1', 'entPhysicalSoftwareRev.1', 'entPhysicalModelName.1000', 'entPhysicalModelName.1001', 'entPhysicalContainedIn.1000', 'entPhysicalContainedIn.1001', 'cardDescr.1', 'cardSlotNumber.1'];
|
||||
|
||||
$data = snmp_get_multi($device, $oids, '-OQUs', 'ENTITY-MIB:OLD-CISCO-CHASSIS-MIB');
|
||||
|
||||
|
17
includes/polling/os/iosxe.inc.php
Normal file
17
includes/polling/os/iosxe.inc.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* LibreNMS
|
||||
*
|
||||
* This file is part of LibreNMS.
|
||||
*
|
||||
* @package LibreNMS
|
||||
* @subpackage polling
|
||||
* @copyright (C) 2019 Librenms
|
||||
*/
|
||||
|
||||
///////////////////////////////////////////////////
|
||||
// Include the standard IOS polling file.
|
||||
// Most of the IOSXE os polling code is identical
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
include 'includes/polling/os/ios.inc.php';
|
14960
tests/data/iosxe_c9300.json
Normal file
14960
tests/data/iosxe_c9300.json
Normal file
File diff suppressed because it is too large
Load Diff
5169
tests/snmpsim/iosxe_c9300.snmprec
Normal file
5169
tests/snmpsim/iosxe_c9300.snmprec
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user