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:
PipoCanaja
2019-11-22 06:16:02 +01:00
committed by Tony Murray
parent 1f24a6783e
commit e1ede81d29
6 changed files with 20152 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ discovery:
sysDescr_except:
- 'LINUX_IOSD'
- 'IOS-XE'
- 'IOSXE'
- 'CAT3K_CAA'
bad_ifXEntry:
- cisco1941

View File

@@ -37,5 +37,6 @@ register_mibs:
discovery:
- sysDescr:
- IOS-XE
- IOSXE
- LINUX_IOSD
- CAT3K_CAA

View File

@@ -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');

View 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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff