mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update support for avaya-vsp and fix problem in functions.php for avaya-vsp (#4237)
newdevice: Improved support for Avaya VSP #4237
This commit is contained in:
@@ -1015,7 +1015,7 @@ $config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['icon'] = 'avaya';
|
||||
|
||||
$os = 'avaya-vsp';
|
||||
$config['os'][$os]['text'] = 'Avaya VSP';
|
||||
$config['os'][$os]['text'] = 'Avaya VOSS';
|
||||
$config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['icon'] = 'avaya';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
|
23
includes/discovery/mempools/avaya-vsp.inc.php
Normal file
23
includes/discovery/mempools/avaya-vsp.inc.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Avaya Memory for VSP with OS VOSS
|
||||
// rcKhiSlotMemUsed 1.3.6.1.4.1.2272.1.85.10.1.1.6.1
|
||||
// rcKhiSlotMemFree 1.3.6.1.4.1.2272.1.85.10.1.1.7.1
|
||||
// rcKhiSlotMemUtil 1.3.6.1.4.1.2272.1.85.10.1.1.8.1
|
||||
|
||||
if ($device['os'] == 'avaya-vsp') {
|
||||
$memutil = trim(snmp_get($device, '.1.3.6.1.4.1.2272.1.85.10.1.1.8.1', '-OvQ'));
|
||||
if (is_numeric($memutil)) {
|
||||
discover_mempool($valid_mempool, $device, 0, 'avaya-vsp', 'VSP Memory', '1', null, null);
|
||||
}
|
||||
}
|
@@ -3,6 +3,7 @@
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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
|
||||
@@ -11,7 +12,32 @@
|
||||
*/
|
||||
|
||||
if (!$os) {
|
||||
if (strstr($sysDescr, 'VSP-') && strstr($sysObjectId, '.1.3.6.1.4.1.2272.208')) {
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.202')) {
|
||||
// VSP-4850GTS
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.203')) {
|
||||
// VSP-4850GTS-PWR+
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.205')) {
|
||||
// VSP-8284XSQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.206')) {
|
||||
// VSP-4450GSX-PWR+
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.208')) {
|
||||
// VSP-8404
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.209')) {
|
||||
// VSP-7254XSQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
if (strstr($sysObjectId, '.1.3.6.1.4.1.2272.210')) {
|
||||
// VSP-7254XTQ
|
||||
$os = 'avaya-vsp';
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,21 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Avaya mibs for cpu on VOSS
|
||||
// rcKhiSlotCpuCurrentUtil 1.3.6.1.4.1.2272.1.85.10.1.1.2.1
|
||||
// rcKhiSlotCpu5MinAve 1.3.6.1.4.1.2272.1.85.10.1.1.3.1
|
||||
|
||||
if ($device['os'] == 'avaya-vsp') {
|
||||
$oid = '.1.3.6.1.4.1.2272.1.85.10.1.1.2.1';
|
||||
$oid = '.1.3.6.1.4.1.2272.1.85.10.1.1.3.1';
|
||||
$usage = snmp_walk($device, $oid, '-Ovq');
|
||||
discover_processor($valid['processor'], $device, $oid, 1, 'avaya-vsp', 'VSP Processor', '1', $usage);
|
||||
}
|
||||
|
@@ -829,7 +829,7 @@ function is_port_valid($port, $device)
|
||||
|
||||
global $config;
|
||||
|
||||
if (strstr($port['ifDescr'], "irtual")) {
|
||||
if (strstr($port['ifDescr'], "irtual") && strpos($port['ifDescr'], "Virtual Services Platform") === false) {
|
||||
$valid = 0;
|
||||
} else {
|
||||
$valid = 1;
|
||||
|
27
includes/polling/mempools/avaya-vsp.inc.php
Normal file
27
includes/polling/mempools/avaya-vsp.inc.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Avaya VSP Memory w/ VOSS
|
||||
// rcKhiSlotMemUsed 1.3.6.1.4.1.2272.1.85.10.1.1.6.1
|
||||
// rcKhiSlotMemFree 1.3.6.1.4.1.2272.1.85.10.1.1.7.1
|
||||
// rcKhiSlotMemUtil 1.3.6.1.4.1.2272.1.85.10.1.1.8.1
|
||||
|
||||
$used = (snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.6.1", '-OvQ') * 1000);
|
||||
$free = (snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.7.1", '-OvQ') * 1000);
|
||||
$perc = snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.8.1", '-OvQ');
|
||||
$total = ($used + $free);
|
||||
if (is_numeric($used) && is_numeric($free) && is_numeric($perc)) {
|
||||
$mempool['total'] = $total;
|
||||
$mempool['free'] = $free;
|
||||
$mempool['used'] = $used;
|
||||
$mempool['perc'] = $perc;
|
||||
}
|
@@ -3,6 +3,7 @@
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Neil Lathwood <neil@lathwood.co.uk>
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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
|
||||
@@ -10,7 +11,20 @@
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
$temp = explode(' ', $poll_device['sysDescr']);
|
||||
$hardware = $temp[0];
|
||||
$serial = snmp_get($device, 'rcChasSerialNumber', '-Osqv', 'RAPID-CITY');
|
||||
$version = snmp_get($device, 'rcSysVersion', '-Osqv', 'RAPID-CITY');
|
||||
// rcSysVersion
|
||||
$version = snmp_get($device, 'rcSysVersion.0', '-Osqv', 'RAPID-CITY');
|
||||
$version = explode(' ', $version);
|
||||
$version = $version[0];
|
||||
$version = str_replace('"', '', $version);
|
||||
|
||||
// rcChasSerialNumber
|
||||
$serial = snmp_get($device, 'rcChasSerialNumber.0', '-Osqv', 'RAPID-CITY');
|
||||
$serial = str_replace('"', '', $serial);
|
||||
|
||||
// rcChasHardwareRevision
|
||||
$sysDescr = $poll_device['sysDescr'];
|
||||
$sysDescr = explode(' ', $sysDescr);
|
||||
$sysDescr = $sysDescr[0];
|
||||
$hwrevision = snmp_get($device, 'rcChasHardwareRevision.0', '-Osqv', 'RAPID-CITY');
|
||||
$hardware = $sysDescr . " HW: $hwrevision";
|
||||
$hardware = str_replace('"', '', $hardware);
|
||||
|
21
includes/polling/processors/avaya-vsp.inc.php
Normal file
21
includes/polling/processors/avaya-vsp.inc.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* Copyright (c) 2016 Daniel Cox <danielcoxman@gmail.com>
|
||||
* 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. Please see LICENSE.txt at the top level of
|
||||
* the source code distribution for details.
|
||||
*/
|
||||
|
||||
// Avaya VSP cpu w/ VOSS
|
||||
// rcKhiSlotCpuCurrentUtil 1.3.6.1.4.1.2272.1.85.10.1.1.2.1
|
||||
// rcKhiSlotCpu5MinAve 1.3.6.1.4.1.2272.1.85.10.1.1.3.1
|
||||
|
||||
$proc = trim(snmp_get($device, "1.3.6.1.4.1.2272.1.85.10.1.1.3.1", "-Ovq"), '"');
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
$proc = ($usage * 100);
|
||||
}
|
Reference in New Issue
Block a user