mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add discovery of mempool percent warning limit (#10618)
* add ability to discover percent warning on mempools discovery * remove wierd charachters from json * remove database defaults, add defaults for Linux and Vmware * update db schema * update test data * adapt hrstorage mempools * rebase
This commit is contained in:
@@ -657,12 +657,12 @@ function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $prec
|
||||
|
||||
//end discover_processor()
|
||||
|
||||
function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = '1', $entPhysicalIndex = null, $hrDeviceIndex = null)
|
||||
function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = '1', $entPhysicalIndex = null, $hrDeviceIndex = null, $perc_warn = '90')
|
||||
{
|
||||
|
||||
$descr = substr($descr, 0, 64);
|
||||
|
||||
d_echo("Discover Mempool: $index, $type, $descr, $precision, $entPhysicalIndex, $hrDeviceIndex\n");
|
||||
d_echo("Discover Mempool: $index, $type, $descr, $precision, $entPhysicalIndex, $hrDeviceIndex, $perc_warn\n");
|
||||
|
||||
// FIXME implement the mempool_perc, mempool_used, etc.
|
||||
if ($descr) {
|
||||
@@ -677,6 +677,7 @@ function discover_mempool(&$valid, $device, $index, $type, $descr, $precision =
|
||||
'mempool_used' => 0,
|
||||
'mempool_free' => 0,
|
||||
'mempool_total' => 0,
|
||||
'mempool_perc_warn' => $perc_warn,
|
||||
);
|
||||
|
||||
if (is_numeric($entPhysicalIndex)) {
|
||||
@@ -694,6 +695,7 @@ function discover_mempool(&$valid, $device, $index, $type, $descr, $precision =
|
||||
echo '.';
|
||||
$update_data = array(
|
||||
'mempool_descr' => $descr,
|
||||
'mempool_perc_warn' => $perc_warn,
|
||||
);
|
||||
|
||||
if (is_numeric($entPhysicalIndex)) {
|
||||
|
Reference in New Issue
Block a user