mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added support for Cisco SRP devices (#6600)
* newdevice: Added support for Cisco SRP devices * added snmprec file
This commit is contained in:
12
includes/definitions/ciscosrp.yaml
Normal file
12
includes/definitions/ciscosrp.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
os: ciscosrp
|
||||||
|
group: cisco
|
||||||
|
text: 'Cisco Services Ready Platform'
|
||||||
|
type: network
|
||||||
|
icon: cisco
|
||||||
|
over:
|
||||||
|
- { graph: device_bits, text: 'Device Traffic' }
|
||||||
|
- { graph: device_processor, text: 'CPU Usage' }
|
||||||
|
- { graph: device_mempool, text: 'Memory Usage' }
|
||||||
|
discovery:
|
||||||
|
- sysObjectId:
|
||||||
|
- .1.3.6.1.4.1.9.1.1157
|
38
includes/polling/os/ciscosrp.inc.php
Normal file
38
includes/polling/os/ciscosrp.inc.php
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* LibreNMS
|
||||||
|
*
|
||||||
|
* This file is part of LibreNMS.
|
||||||
|
*
|
||||||
|
* @package LibreNMS
|
||||||
|
* @subpackage polling
|
||||||
|
* @copyright (C) 2016 Librenms
|
||||||
|
*/
|
||||||
|
|
||||||
|
$oids = 'entPhysicalModelName.1 entPhysicalContainedIn.1 entPhysicalName.1 entPhysicalSoftwareRev.1 entPhysicalModelName.1001 entPhysicalContainedIn.1001 cardDescr.1 cardSlotNumber.1';
|
||||||
|
|
||||||
|
$data = snmp_get_multi($device, $oids, '-OQUs', 'ENTITY-MIB:OLD-CISCO-CHASSIS-MIB');
|
||||||
|
|
||||||
|
if ($data[1]['entPhysicalContainedIn'] == '0') {
|
||||||
|
if (!empty($data[1]['entPhysicalSoftwareRev'])) {
|
||||||
|
$version = $data[1]['entPhysicalSoftwareRev'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data[1]['entPhysicalName'])) {
|
||||||
|
$hardware = $data[1]['entPhysicalName'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data[1]['entPhysicalModelName'])) {
|
||||||
|
$hardware = $data[1]['entPhysicalModelName'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($data[1000]['entPhysicalModelName'])) {
|
||||||
|
$hardware = $data[1000]['entPhysicalModelName'];
|
||||||
|
} elseif (!empty($data[1000]['entPhysicalContainedIn'])) {
|
||||||
|
$hardware = $data[$data[1000]['entPhysicalContainedIn']]['entPhysicalName'];
|
||||||
|
} elseif (!empty($data[1001]['entPhysicalModelName'])) {
|
||||||
|
$hardware = $data[1001]['entPhysicalModelName'];
|
||||||
|
} elseif (!empty($data[1001]['entPhysicalContainedIn'])) {
|
||||||
|
$hardware = $data[$data[1001]['entPhysicalContainedIn']]['entPhysicalName'];
|
||||||
|
}
|
2
tests/snmpsim/ciscosrp.snmprec
Normal file
2
tests/snmpsim/ciscosrp.snmprec
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
1.3.6.1.2.1.1.1.0|4|SRP541W, GE WAN, 802.11n ETSI, 4FXS/1FXO
|
||||||
|
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.9.1.1157
|
Reference in New Issue
Block a user