Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
newdevice: Added CPU and Memory pool for BDCom Switchs (#6523)
* Added feature CPU and Memory monitoring on BDCom switchs * Added feature CPU and Memory monitoring on BDCom switchs, plus pre-commit check * Added mib files, and modification given by laf * Replaced png logo with a svg version. Modification in the validation of processor discovery. * Replaced png logo with a svg version. Modification in the validation of processor discovery + added files.
- Loading branch information
1 parent
2f5a174
commit 233f8e8
Showing
120 changed files
with
40,255 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
os: bdcom | ||
text: 'Calix E7' | ||
text: 'BDCOM(tm) Software' | ||
type: network | ||
icon: bdcom | ||
over: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/* | ||
* | ||
* LibreNMS mempools discovery module for BDCom switches | ||
* | ||
* 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. | ||
* @package LibreNMS | ||
* @subpackage discovery | ||
* @link http://librenms.org | ||
* @copyright 2017 Carlos A. Pedreros Lizama | ||
* @author Carlos A. Pedreros Lizama <carlos.pedreros@gmail.com> | ||
*/ | ||
|
||
if ($device['os'] == 'bdcom') { | ||
echo 'BDCOM, NMS-MEMORY-POOL-MIB: '; | ||
|
||
$memory_pool = snmp_get_multi_oid($device, 'nmsMemoryPoolTotalMemorySize.0 nmsMemoryPoolUtilization.0', '-OQUs', 'NMS-MEMORY-POOL-MIB'); | ||
|
||
$total = $memory_pool['nmsMemoryPoolTotalMemorySize.0']; | ||
$perc = $memory_pool['nmsMemoryPoolUtilization.0']; | ||
|
||
if (is_numeric($total) && is_numeric($perc)) { | ||
discover_mempool($valid_mempool, $device, 0, 'bdcom', 'Memory', '1', null, null); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/* | ||
* | ||
* LibreNMS processors discovery module for BDCom switches | ||
* | ||
* 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. | ||
* @package LibreNMS | ||
* @subpackage discovery | ||
* @link http://librenms.org | ||
* @copyright 2017 Carlos A. Pedreros Lizama | ||
* @author Carlos A. Pedreros Lizama <carlos.pedreros@gmail.com> | ||
*/ | ||
|
||
if ($device['os'] == 'bdcom') { | ||
echo 'BDCOM, NMS-PROCESS-MIB: '; | ||
|
||
$usage = snmp_get($device, 'nmspmCPUTotal5min.1', '-Ovq', 'NMS-PROCESS-MIB'); | ||
|
||
if (is_numeric($usage['nmspmCPUTotal5min.1'])) { | ||
discover_processor($valid['processor'], $device, 'NMS-PROCESS-MIB::nmspmCPUTotal5min.1', '0', 'bdcom', 'CPU', '1', $usage, null, null); | ||
} | ||
} | ||
|
||
unset($processors_array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/* | ||
* | ||
* LibreNMS mempools polling module for BDCom switches | ||
* | ||
* 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. | ||
* @package LibreNMS | ||
* @subpackage polling | ||
* @link http://librenms.org | ||
* @copyright 2017 Carlos A. Pedreros Lizama | ||
* @author Carlos A. Pedreros Lizama <carlos.pedreros@gmail.com> | ||
*/ | ||
|
||
echo 'BDCOM Memory Pool'; | ||
|
||
$memory_pool = snmp_get_multi_oid($device, 'nmsMemoryPoolTotalMemorySize.0 nmsMemoryPoolUtilization.0', '-OQUs', 'NMS-MEMORY-POOL-MIB'); | ||
|
||
$mempool['total'] = $memory_pool['nmsMemoryPoolTotalMemorySize.0']; | ||
$mempool['perc'] = $memory_pool['nmsMemoryPoolUtilization.0']; | ||
$mempool['used'] = ($mempool['total'] / 100 * $mempool['perc']); | ||
$mempool['free'] = ($mempool['total'] - $mempool['used']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
/* | ||
BDCOM(tm) S2524C Software, Version 2.1.0A Build 5721 | ||
Compiled: 2011-11-1 15:57:26 by SYS | ||
ROM: System Bootstrap,Version 0.3.2,Serial num:27072980 | ||
**/ | ||
*/ | ||
|
||
preg_match('/BDCOM\(tm\) ([A-Z0-9]+) Software, Version (.*)\nCompiled: (.*)\n(.*),Serial num:([0-9]+)/', $poll_device['sysDescr'], $matches); | ||
$hardware = $matches['1']; | ||
|
||
$hardware = $matches['1']; | ||
$version = $matches['2']; | ||
$serial = $matches['5']; |
Oops, something went wrong.