mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Canopy frame utilization and updated MIBs (#5858)
This commit is contained in:
committed by
Neil Lathwood
parent
9384d306ac
commit
4ef0a2d719
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
$rrdfilename = rrd_name($device['hostname'], 'canopy-generic-frameUtilization');
|
||||
if (file_exists($rrdfilename)) {
|
||||
$rrd_options .= " COMMENT:'% Now Ave Max \\n'";
|
||||
$rrd_options .= ' DEF:downlinkutilization='.$rrdfilename.':downlinkutilization:AVERAGE ';
|
||||
$rrd_options .= ' DEF:uplinkutilization='.$rrdfilename.':uplinkutilization:AVERAGE ';
|
||||
$rrd_options .= " LINE2:downlinkutilization#FF0000:'Downlink Frame Utilization ' ";
|
||||
$rrd_options .= ' GPRINT:downlinkutilization:LAST:%0.2lf%s ';
|
||||
$rrd_options .= ' GPRINT:downlinkutilization:MIN:%0.2lf%s ';
|
||||
$rrd_options .= ' GPRINT:downlinkutilization:MAX:%0.2lf%s\\\l ';
|
||||
$rrd_options .= " LINE2:uplinkutilization#003EFF:'Uplink Frame Utilization ' ";
|
||||
$rrd_options .= ' GPRINT:uplinkutilization:LAST:%0.2lf%s ';
|
||||
$rrd_options .= ' GPRINT:uplinkutilization:MIN:%0.2lf%s ';
|
||||
$rrd_options .= ' GPRINT:uplinkutilization:MAX:%0.2lf%s\\\l ';
|
||||
}
|
||||
@@ -308,6 +308,9 @@ $config['graph_types']['device']['canopy_generic_errorCount']['descr'] = 'Erro
|
||||
$config['graph_types']['device']['canopy_generic_crcErrors']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['canopy_generic_crcErrors']['order'] = '15';
|
||||
$config['graph_types']['device']['canopy_generic_crcErrors']['descr'] = 'CRC Errors';
|
||||
$config['graph_types']['device']['canopy-generic-frameUtilization']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['canopy-generic-frameUtilization']['order'] = '16';
|
||||
$config['graph_types']['device']['canopy-generic-frameUtilization']['descr'] = 'Frame Utilization';
|
||||
|
||||
$config['graph_types']['device']['cambium_epmp_RFStatus']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['cambium_epmp_RFStatus']['order'] = '0';
|
||||
|
||||
@@ -257,8 +257,14 @@ if (strstr($version, 'AP') == false) {
|
||||
|
||||
//AP Equipment
|
||||
if (strstr($version, 'AP')) {
|
||||
$registered = str_replace('"', "", snmp_get($device, "regCount.0", "-Ovqn", "WHISP-APS-MIB"));
|
||||
$failed = str_replace('"', "", snmp_get($device, "regFailureCount.0", "-Ovqn", "WHISP-APS-MIB"));
|
||||
$multi_get_array = snmp_get_multi($device, "regCount.0 regFailureCount.0 currentRadioFreqCarrier.0 frUtlLowTotalDownlinkUtilization.0 frUtlLowTotalUplinkUtilization.0", "-OQU", "WHISP-APS-MIB");
|
||||
d_echo($multi_get_array);
|
||||
$registered = $multi_get_array[0]["WHISP-APS-MIB::regCount"];
|
||||
$failed = $multi_get_array[0]["WHISP-APS-MIB::regFailureCount"];
|
||||
$freq = $multi_get_array[0]["WHISP-APS-MIB::currentRadioFreqCarrier"];
|
||||
$downlinkutilization = $multi_get_array[0]["WHISP-APS-MIB::frUtlLowTotalDownlinkUtilization"];
|
||||
$uplinkutilization = $multi_get_array[0]["WHISP-APS-MIB::frUtlLowTotalUplinkUtilization"];
|
||||
|
||||
if (is_numeric($registered) && is_numeric($failed)) {
|
||||
$rrd_def = array(
|
||||
'DS:regCount:GAUGE:600:0:15000',
|
||||
@@ -274,7 +280,6 @@ if (strstr($version, 'AP')) {
|
||||
unset($rrd_filename, $registered, $failed);
|
||||
}
|
||||
|
||||
$freq = str_replace('"', "", snmp_get($device, "currentRadioFreqCarrier.0", "-Ovqn", "WHISP-APS-MIB"));
|
||||
if (is_numeric($freq)) {
|
||||
$rrd_def = 'DS:freq:GAUGE:600:0:100000';
|
||||
if ($freq > 99999) {
|
||||
@@ -290,4 +295,19 @@ if (strstr($version, 'AP')) {
|
||||
$graphs['canopy_generic_freq'] = true;
|
||||
unset($rrd_filename, $freq);
|
||||
}
|
||||
|
||||
if (is_numeric($downlinkutilization) && is_numeric($uplinkutilization)) {
|
||||
$rrd_def = array(
|
||||
'DS:downlinkutilization:GAUGE:600:0:15000',
|
||||
'DS:uplinkutilization:GAUGE:600:0:15000'
|
||||
);
|
||||
$fields = array(
|
||||
'downlinkutilization' => $downlinkutilization,
|
||||
'uplinkutilization' => $uplinkutilization,
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-frameUtilization', $tags, $fields);
|
||||
$graphs['canopy-generic-frameUtilization'] = true;
|
||||
unset($rrd_filename, $downlinkutilization, $uplinkutilization);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
69
mibs/cambium/WHISP-TCV2-MIB
Normal file
69
mibs/cambium/WHISP-TCV2-MIB
Normal file
@@ -0,0 +1,69 @@
|
||||
--
|
||||
-- whisp-tc.mib
|
||||
--
|
||||
-- ********************************************************************
|
||||
-- Copyright 2005 - 2015 (c) Cambium Networks
|
||||
-- Cambium Networks Confidential Proprietary
|
||||
-- ********************************************************************
|
||||
--
|
||||
-- Contains SMIv2 Textual conventions for the Canopy Product Line.
|
||||
--
|
||||
-- ********************************************************************
|
||||
-- $Id: WHISP-TCV2-MIB.txt,v 1.2 2009/10/06 16:45:08 aff003 Exp $
|
||||
--
|
||||
-- Revision History:
|
||||
--
|
||||
-- <Date> <Author> <Changes>
|
||||
-- 17/May/2000 B.M Initial release.
|
||||
-- 05/Nov/2001 Y.G Modification
|
||||
-- 01/Oct/2009 Nando Corrected Module name
|
||||
-- ********************************************************************
|
||||
|
||||
WHISP-TCV2-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY
|
||||
FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION
|
||||
FROM SNMPv2-TC
|
||||
whispModules
|
||||
FROM WHISP-GLOBAL-REG-MIB;
|
||||
|
||||
whispTextualConventionsModule MODULE-IDENTITY
|
||||
LAST-UPDATED "200304170000Z"
|
||||
ORGANIZATION "Motorola"
|
||||
CONTACT-INFO
|
||||
"Canopy Technical Support
|
||||
email: technical-support@canopywireless.com"
|
||||
DESCRIPTION
|
||||
"This module contains textual conventions for the Canopy
|
||||
product line."
|
||||
::= {whispModules 3}
|
||||
|
||||
-- -------------------------------------------------------------------------
|
||||
-- Start Textual Conventions Definitions.
|
||||
-- -------------------------------------------------------------------------
|
||||
|
||||
-- Textual convention for MAC address
|
||||
WhispMACAddress ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This a WHiSP MAC address or ESN type."
|
||||
SYNTAX OCTET STRING(SIZE(6))
|
||||
|
||||
--Textual convention for LUID
|
||||
WhispLUID ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The 12 LUID (Local Unit Identification) assigned to each Canopy
|
||||
Subscriber Modem (SM)."
|
||||
SYNTAX INTEGER(0..4095)
|
||||
|
||||
-- Textual convention for Event Log
|
||||
EventString ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "2048a"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The string used to display event log."
|
||||
SYNTAX OCTET STRING(SIZE (0..2048))
|
||||
END
|
||||
Reference in New Issue
Block a user