mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Add basic support for CradlePoint Ceullular Broadband Rotuers new file: html/images/os/cradlepoint.png new file: includes/definitions/wipipe.yaml new file: includes/discovery/sensors/dbm/wipipe.inc.php new file: includes/discovery/sensors/pre-cache/wipipe.inc.php new file: includes/discovery/sensors/state/wipipe.inc.php new file: includes/polling/os/wipipe.inc.php * Added snmprec test file * Updated definitions file * Updated copyright blocks and comments * Added WIPIPE-MIB# * renamed: tests/snmpsim/wipipe.smmprec -> tests/snmpsim/wipipe.snmprec * copied: html/images/os/cradlepoint.png -> html/images/logos/cradlepoint.png modified: html/images/os/cradlepoint.png modified: includes/definitions/wipipe.yaml modified: includes/discovery/sensors/pre-cache/wipipe.inc.php modified: includes/polling/os/wipipe.inc.php * Changes requested by laf modified: includes/discovery/sensors/dbm/wipipe.inc.php modified: includes/discovery/sensors/pre-cache/wipipe.inc.php modified: includes/polling/os/wipipe.inc.php * Reworked devFWUpgradeStatus state sensor modified: includes/discovery/sensors/state/wipipe.inc.php * Fixed hardware/OS version detection modified: includes/polling/os/wipipe.inc.php * moved mib file to correct location
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
* LibreNMS Interface Modem Signal Strength dBm module for the CradlePoint WiPipe Platform
|
|
*
|
|
* © 2017 Chris A. Evans <thecityofguanyu@outlook.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.
|
|
*/
|
|
|
|
echo 'CradlePoint WiPipe';
|
|
|
|
$multiplier = 1;
|
|
$divisor = 1;
|
|
|
|
foreach ($pre_cache['wipipe_oids'] as $index => $entry) {
|
|
// Modem Signal Strength
|
|
if ($entry['mdmSignalStrength']) {
|
|
$oid = '.1.3.6.1.4.1.20992.1.2.2.1.4.' . $index;
|
|
// Get Modem Model & Phone Number for description
|
|
$modemdesc = $entry['mdmDescr'];
|
|
$modemmdn = $entry['mdmMDN'];
|
|
$descr = "Signal Strength - " . $modemdesc . " - " . $modemmdn;
|
|
$currentsignal = $entry['mdmSignalStrength'];
|
|
// Discover Sensor
|
|
discover_sensor(
|
|
$valid['sensor'],
|
|
'dbm',
|
|
$device,
|
|
$oid,
|
|
'mdmSignalStrength.'.$index,
|
|
'wipipe',
|
|
$descr,
|
|
$divisor,
|
|
$multiplier,
|
|
null,
|
|
null,
|
|
null,
|
|
null,
|
|
$currentsignal,
|
|
'snmp'
|
|
);
|
|
}
|
|
}
|