From 5d3e06ee695fff36556b48c02800448d498cfd55 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 25 Nov 2020 10:31:24 -0600 Subject: [PATCH] Change mempools summary graph to show values v2 (#12355) * Change mempools summary graph to show values put swap on the negative axis fix swap classification * fix whitespace * fix incorrect class fix rrd rename logic * Style * missed one * observe with the correct class --- LibreNMS/Modules/Mempools.php | 7 ++- LibreNMS/Modules/Mpls.php | 2 +- LibreNMS/Modules/Nac.php | 2 +- LibreNMS/OS/Coriant.php | 2 +- LibreNMS/OS/Traits/HostResources.php | 2 +- app/Models/Mempool.php | 14 ++++- app/Observers/MempoolObserver.php | 46 +++++++++++++++ .../Observers}/ModuleModelObserver.php | 10 ++-- includes/html/graphs/device/mempool.inc.php | 57 ++++++++++++------- tests/data/aix.json | 2 +- tests/data/aix_net-snmp.json | 2 +- tests/data/aix_std.json | 2 +- tests/data/arbos.json | 2 +- tests/data/barracudangfirewall.json | 2 +- tests/data/bluecatnetworks.json | 2 +- tests/data/cirpack.json | 2 +- tests/data/datadomain.json | 2 +- tests/data/dell-os10.json | 2 +- tests/data/dhcpatriot.json | 2 +- tests/data/dsm.json | 2 +- tests/data/dsm_ds214se.json | 2 +- tests/data/exagridos.json | 2 +- tests/data/gaia.json | 2 +- tests/data/gos.json | 2 +- tests/data/mobileiron_core.json | 2 +- tests/data/mobileiron_sentry.json | 2 +- tests/data/nios.json | 2 +- tests/data/omnipcx.json | 2 +- tests/data/panos_vsys.json | 2 +- tests/data/procera.json | 2 +- tests/data/qnap.json | 2 +- tests/data/quantastor.json | 2 +- tests/data/recoveryos.json | 2 +- tests/data/recoveryos_8024s.json | 2 +- tests/data/solidserver.json | 2 +- tests/data/sophos-xg.json | 2 +- tests/data/truenas.json | 2 +- 37 files changed, 136 insertions(+), 62 deletions(-) create mode 100644 app/Observers/MempoolObserver.php rename {LibreNMS/Util => app/Observers}/ModuleModelObserver.php (92%) diff --git a/LibreNMS/Modules/Mempools.php b/LibreNMS/Modules/Mempools.php index 0a98abdfe6..14cbe4f1b4 100644 --- a/LibreNMS/Modules/Mempools.php +++ b/LibreNMS/Modules/Mempools.php @@ -26,6 +26,7 @@ namespace LibreNMS\Modules; use App\Models\Mempool; +use App\Observers\MempoolObserver; use Illuminate\Support\Collection; use LibreNMS\DB\SyncsModels; use LibreNMS\Interfaces\Discovery\MempoolsDiscovery; @@ -33,7 +34,6 @@ use LibreNMS\Interfaces\Module; use LibreNMS\Interfaces\Polling\MempoolsPolling; use LibreNMS\OS; use LibreNMS\RRD\RrdDefinition; -use LibreNMS\Util\ModuleModelObserver; use Log; class Mempools implements Module @@ -53,7 +53,7 @@ class Mempools implements Module }); $this->calculateAvailable($mempools); - ModuleModelObserver::observe('\App\Models\Mempool'); + MempoolObserver::observe('\App\Models\Mempool'); $this->syncModels($os->getDevice(), 'mempools', $mempools); echo PHP_EOL; @@ -80,8 +80,9 @@ class Mempools implements Module if (empty($mempool->mempool_class)) { Log::debug('Mempool skipped. Does not include class.'); - } + return; + } $mempool->save(); $rrd_name = ['mempool', $mempool->mempool_type, $mempool->mempool_class, $mempool->mempool_index]; diff --git a/LibreNMS/Modules/Mpls.php b/LibreNMS/Modules/Mpls.php index 1efd0c7072..ed69133963 100644 --- a/LibreNMS/Modules/Mpls.php +++ b/LibreNMS/Modules/Mpls.php @@ -26,12 +26,12 @@ namespace LibreNMS\Modules; +use App\Observers\ModuleModelObserver; use LibreNMS\DB\SyncsModels; use LibreNMS\Interfaces\Discovery\MplsDiscovery; use LibreNMS\Interfaces\Module; use LibreNMS\Interfaces\Polling\MplsPolling; use LibreNMS\OS; -use LibreNMS\Util\ModuleModelObserver; class Mpls implements Module { diff --git a/LibreNMS/Modules/Nac.php b/LibreNMS/Modules/Nac.php index cd431e9664..9df34d0a28 100644 --- a/LibreNMS/Modules/Nac.php +++ b/LibreNMS/Modules/Nac.php @@ -25,10 +25,10 @@ namespace LibreNMS\Modules; use App\Models\PortsNac; +use App\Observers\ModuleModelObserver; use LibreNMS\Interfaces\Module; use LibreNMS\Interfaces\Polling\NacPolling; use LibreNMS\OS; -use LibreNMS\Util\ModuleModelObserver; class Nac implements Module { diff --git a/LibreNMS/OS/Coriant.php b/LibreNMS/OS/Coriant.php index e3c4c37384..5df7982ff6 100644 --- a/LibreNMS/OS/Coriant.php +++ b/LibreNMS/OS/Coriant.php @@ -26,8 +26,8 @@ namespace LibreNMS\OS; use App\Models\TnmsneInfo; +use App\Observers\ModuleModelObserver; use LibreNMS\Interfaces\Polling\OSPolling; -use LibreNMS\Util\ModuleModelObserver; use Log; class Coriant extends \LibreNMS\OS implements OSPolling diff --git a/LibreNMS/OS/Traits/HostResources.php b/LibreNMS/OS/Traits/HostResources.php index b96d89f40d..a2caf4e96d 100644 --- a/LibreNMS/OS/Traits/HostResources.php +++ b/LibreNMS/OS/Traits/HostResources.php @@ -169,7 +169,7 @@ trait HostResources 'mempool_perc_warn' => $this->memoryDescrWarn[$storage['hrStorageDescr']] ?? 90, 'mempool_used_oid' => ".1.3.6.1.2.1.25.2.3.1.6.$index", 'mempool_total_oid' => null, - ]))->setClass($storage['hrStorageType'] == 'hrStorageVirtualMemory' ? 'virtual' : null) + ]))->setClass(null, $storage['hrStorageType'] == 'hrStorageVirtualMemory' ? 'virtual' : 'system') ->fillUsage($storage['hrStorageUsed'], $total); }); } diff --git a/app/Models/Mempool.php b/app/Models/Mempool.php index de7e78e99b..354b3baa96 100644 --- a/app/Models/Mempool.php +++ b/app/Models/Mempool.php @@ -95,10 +95,11 @@ class Mempool extends DeviceRelatedModel implements Keyable /** * Set the mempool class. If no class is given, try to detect it from available data. * - * @param null $class + * @param string $class + * @param string $default * @return \App\Models\Mempool */ - public function setClass($class = null) + public function setClass($class = null, $default = 'system') { if ($class) { $this->mempool_class = $class; @@ -124,7 +125,14 @@ class Mempool extends DeviceRelatedModel implements Keyable return $this; } } - $this->mempool_class = 'system'; // just call everything else system + + if ($default == 'virtual' && Str::contains($this->mempool_descr, ['/dev/'])) { + $this->mempool_class = 'swap'; + + return $this; + } + + $this->mempool_class = $default; return $this; } diff --git a/app/Observers/MempoolObserver.php b/app/Observers/MempoolObserver.php new file mode 100644 index 0000000000..26363aa0e3 --- /dev/null +++ b/app/Observers/MempoolObserver.php @@ -0,0 +1,46 @@ +. + * + * @package LibreNMS + * @link http://librenms.org + * @copyright 2020 Tony Murray + * @author Tony Murray + */ + +namespace App\Observers; + +use Illuminate\Database\Eloquent\Model as Eloquent; +use Log; + +class MempoolObserver extends ModuleModelObserver +{ + public function updated(Eloquent $model) + { + parent::updated($model); + + if ($model->isDirty('mempool_class')) { + Log::debug("Mempool class changed $model->mempool_descr ($model->mempool_id)"); + rrd_file_rename( + $model->device->toArray(), + ['mempool', $model->mempool_type, $model->getOriginal('mempool_class'), $model->mempool_index], + ['mempool', $model->mempool_type, $model->mempool_class, $model->mempool_index] + ); + } + } +} diff --git a/LibreNMS/Util/ModuleModelObserver.php b/app/Observers/ModuleModelObserver.php similarity index 92% rename from LibreNMS/Util/ModuleModelObserver.php rename to app/Observers/ModuleModelObserver.php index 9cfa72ae04..c60955b862 100644 --- a/LibreNMS/Util/ModuleModelObserver.php +++ b/app/Observers/ModuleModelObserver.php @@ -1,6 +1,6 @@ . * * @link http://librenms.org - * @copyright 2018 Tony Murray + * @copyright 2020 Tony Murray * @author Tony Murray */ -namespace LibreNMS\Util; +namespace App\Observers; use Illuminate\Database\Eloquent\Model as Eloquent; @@ -39,7 +39,7 @@ class ModuleModelObserver $class = ltrim($model, '\\'); if (! in_array($class, $observed_models)) { - $model::observe(new ModuleModelObserver()); + $model::observe(new static()); $observed_models[] = $class; } } diff --git a/includes/html/graphs/device/mempool.inc.php b/includes/html/graphs/device/mempool.inc.php index 809f9a035b..acb65f4cab 100644 --- a/includes/html/graphs/device/mempool.inc.php +++ b/includes/html/graphs/device/mempool.inc.php @@ -4,8 +4,7 @@ use App\Models\Mempool; require 'includes/html/graphs/common.inc.php'; -$rrd_options .= ' -u 100 -l 0 -E -b 1024 '; -$rrd_options .= " COMMENT:' Min Cur Max Used\\n'"; +$rrd_options .= ' -E -b 1024 '; // order mempools properly $mempool_classes = [ @@ -29,18 +28,25 @@ $mempools = DeviceCache::get($device['device_id'])->mempools->sort(function (Mem // find available $available = null; -$available_key = $mempools->search(function (Mempool $mempool) { - return $mempool->mempool_class == 'available'; -}); -if ($available_key !== false) { - $available = $mempools->get($available_key); - $mempools->forget($available_key); +$swap_present = false; +foreach ($mempools as $index => $mempool) { + if ($mempool->mempool_class == 'available') { + $available = $mempool; + $mempools->forget($index); + } elseif ($mempool->mempool_class == 'swap') { + $swap_present = true; + } +} + +if (! $swap_present) { + $rrd_options .= '-l 0 '; // swap is negative axis } $colors = \LibreNMS\Config::get('graph_colours.varied'); $legend_sections = [0 => '', 1 => '']; $section = 0; $free_indexes = []; +$rrd_options .= " COMMENT:' Min Max Cur \\n'"; /** @var \App\Models\Mempool $mempool */ foreach ($mempools as $index => $mempool) { @@ -52,24 +58,37 @@ foreach ($mempools as $index => $mempool) { if (rrdtool_check_rrd_exists($rrd_filename)) { $rrd_options .= " DEF:mempoolfree$index=$rrd_filename:free:AVERAGE "; $rrd_options .= " DEF:mempoolused$index=$rrd_filename:used:AVERAGE "; - $rrd_options .= " CDEF:mempooltotal$index=mempoolused$index,mempoolused$index,mempoolfree$index,+,/,100,* "; + $rrd_options .= " CDEF:mempooltotal$index=mempoolused$index,mempoolfree$index,+ "; + $rrd_options .= " CDEF:mempoolpercent$index=mempoolused$index,mempooltotal$index,/,100,* "; $system_pools = in_array($mempool->mempool_class, ['system', 'cached', 'buffers']); $stack = $system_pools && $index > 0 ? ':STACK' : ''; if ($system_pools) { $free_indexes[] = $index; - $rrd_options .= " AREA:mempooltotal$index#{$color}70:$stack"; + $rrd_options .= " AREA:mempoolused$index#{$color}70:$stack"; } + if ($mempool->mempool_class == 'system') { + // add system + $legend_sections[1] .= " LINE1:mempooltotal$index#AAAAAA:'Total '"; + $legend_sections[1] .= " GPRINT:mempooltotal$index:LAST:%6.2lf%siB\\l "; + } if ($mempool->mempool_class == 'swap') { $section = 2; + $rrd_options .= " CDEF:mempoolswap$index=mempoolused$index,-1,* "; + $rrd_options .= " AREA:mempoolswap$index#{$color}70:$stack"; + $legend_sections[$section] .= " LINE1.5:mempoolswap$index#$color:'$descr'$stack"; + } elseif ($mempool->mempool_class == 'virtual') { + $section = 2; + $legend_sections[$section] .= " COMMENT:' $descr'"; + } else { + $legend_sections[$section] .= " LINE1.5:mempoolused$index#$color:'$descr'$stack"; } - $legend_sections[$section] .= " LINE1.5:mempooltotal$index#$color:'$descr'$stack"; - $legend_sections[$section] .= " GPRINT:mempooltotal$index:MIN:%3.0lf%%"; - $legend_sections[$section] .= " GPRINT:mempooltotal$index:LAST:%3.0lf%%"; - $legend_sections[$section] .= " GPRINT:mempooltotal$index:MAX:%3.0lf%%"; - $legend_sections[$section] .= " GPRINT:mempoolused$index:LAST:%6.2lf%sB\\l "; + $legend_sections[$section] .= " GPRINT:mempoolpercent$index:MIN:%3.0lf%%"; + $legend_sections[$section] .= " GPRINT:mempoolpercent$index:MAX:%3.0lf%%"; + $legend_sections[$section] .= " GPRINT:mempoolpercent$index:LAST:%3.0lf%%"; + $legend_sections[$section] .= " GPRINT:mempoolused$index:LAST:%6.2lf%siB\\l "; } } @@ -77,13 +96,13 @@ foreach ($mempools as $index => $mempool) { if (! empty($free_indexes)) { $mempool_classes = $mempools->pluck('mempool_class'); if ($mempool_classes->contains('buffers') || $mempool_classes->contains('cached')) { - $rrd_options .= ' CDEF:mempoolfree=100,mempooltotal' . implode(',mempooltotal', $free_indexes) . str_repeat(',-', count($free_indexes)); + $rrd_options .= ' CDEF:mempoolfree=100,mempoolpercent' . implode(',mempoolpercent', $free_indexes) . str_repeat(',-', count($free_indexes)); $rrd_options .= " CDEF:mempoolfreebytes=mempoolfree{$free_indexes[0]},mempoolused{$free_indexes[0]},+,mempoolfree,100,/,*"; $legend_sections[1] .= " COMMENT:' Free memory '"; $legend_sections[1] .= ' GPRINT:mempoolfree:MIN:%3.0lf%%'; $legend_sections[1] .= ' GPRINT:mempoolfree:LAST:%3.0lf%%'; $legend_sections[1] .= ' GPRINT:mempoolfree:MAX:%3.0lf%%'; - $legend_sections[1] .= ' GPRINT:mempoolfreebytes:LAST:%6.2lf%sB\l'; + $legend_sections[1] .= ' GPRINT:mempoolfreebytes:LAST:%6.2lf%siB\l'; if ($available === null) { $rrd_options .= " CDEF:mempoolavailablebytes=mempoolfree{$free_indexes[0]}"; @@ -92,12 +111,12 @@ if (! empty($free_indexes)) { $rrd_options .= " DEF:mempoolavailablebytes=$available_filename:free:AVERAGE"; } - $rrd_options .= " CDEF:mempoolavailable=100,mempooltotal{$free_indexes[0]},-"; + $rrd_options .= " CDEF:mempoolavailable=100,mempoolpercent{$free_indexes[0]},-"; $legend_sections[1] .= " COMMENT:' Available memory '"; $legend_sections[1] .= ' GPRINT:mempoolavailable:MIN:%3.0lf%%'; $legend_sections[1] .= ' GPRINT:mempoolavailable:LAST:%3.0lf%%'; $legend_sections[1] .= ' GPRINT:mempoolavailable:MAX:%3.0lf%%'; - $legend_sections[1] .= ' GPRINT:mempoolavailablebytes:LAST:%6.2lf%sB\l'; + $legend_sections[1] .= ' GPRINT:mempoolavailablebytes:LAST:%6.2lf%siB\l'; } } diff --git a/tests/data/aix.json b/tests/data/aix.json index bbb27b96ef..422e661484 100644 --- a/tests/data/aix.json +++ b/tests/data/aix.json @@ -533,7 +533,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 4096, "mempool_descr": "/dev/hd6", "mempool_perc": 4, diff --git a/tests/data/aix_net-snmp.json b/tests/data/aix_net-snmp.json index f152b64650..061e51e721 100644 --- a/tests/data/aix_net-snmp.json +++ b/tests/data/aix_net-snmp.json @@ -155,7 +155,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 4096, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/aix_std.json b/tests/data/aix_std.json index ae21d28e64..621b7c567d 100644 --- a/tests/data/aix_std.json +++ b/tests/data/aix_std.json @@ -961,7 +961,7 @@ "mempool_index": "21", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 4096, "mempool_descr": "/dev/hd6", "mempool_perc": 0, diff --git a/tests/data/arbos.json b/tests/data/arbos.json index fcb3254ee0..5cbfee731f 100644 --- a/tests/data/arbos.json +++ b/tests/data/arbos.json @@ -86,7 +86,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/barracudangfirewall.json b/tests/data/barracudangfirewall.json index c191ef7862..b43db511d8 100644 --- a/tests/data/barracudangfirewall.json +++ b/tests/data/barracudangfirewall.json @@ -4035,7 +4035,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 1, diff --git a/tests/data/bluecatnetworks.json b/tests/data/bluecatnetworks.json index 0e76ad3c11..4ba16e5790 100644 --- a/tests/data/bluecatnetworks.json +++ b/tests/data/bluecatnetworks.json @@ -1028,7 +1028,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/cirpack.json b/tests/data/cirpack.json index e8f8ef7235..0386aae221 100644 --- a/tests/data/cirpack.json +++ b/tests/data/cirpack.json @@ -2351,7 +2351,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 1, diff --git a/tests/data/datadomain.json b/tests/data/datadomain.json index b5edd11935..f850b2b148 100644 --- a/tests/data/datadomain.json +++ b/tests/data/datadomain.json @@ -124,7 +124,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/dell-os10.json b/tests/data/dell-os10.json index d877841546..a11bfb94a3 100644 --- a/tests/data/dell-os10.json +++ b/tests/data/dell-os10.json @@ -7887,7 +7887,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/dhcpatriot.json b/tests/data/dhcpatriot.json index c81ae4e498..f9f7579d98 100644 --- a/tests/data/dhcpatriot.json +++ b/tests/data/dhcpatriot.json @@ -1061,7 +1061,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 1, diff --git a/tests/data/dsm.json b/tests/data/dsm.json index afc81826d5..eff11f1cec 100644 --- a/tests/data/dsm.json +++ b/tests/data/dsm.json @@ -2781,7 +2781,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 13, diff --git a/tests/data/dsm_ds214se.json b/tests/data/dsm_ds214se.json index bba00f70c8..95844c8133 100644 --- a/tests/data/dsm_ds214se.json +++ b/tests/data/dsm_ds214se.json @@ -814,7 +814,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/exagridos.json b/tests/data/exagridos.json index 873f90ede7..064f19d4f5 100644 --- a/tests/data/exagridos.json +++ b/tests/data/exagridos.json @@ -1985,7 +1985,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/gaia.json b/tests/data/gaia.json index 9a77eae406..c0aecb73a5 100644 --- a/tests/data/gaia.json +++ b/tests/data/gaia.json @@ -2398,7 +2398,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/gos.json b/tests/data/gos.json index 706a7f209f..0f92e27f1f 100644 --- a/tests/data/gos.json +++ b/tests/data/gos.json @@ -2691,7 +2691,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/mobileiron_core.json b/tests/data/mobileiron_core.json index 6d75a4cc0a..a556213fc8 100644 --- a/tests/data/mobileiron_core.json +++ b/tests/data/mobileiron_core.json @@ -1039,7 +1039,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/mobileiron_sentry.json b/tests/data/mobileiron_sentry.json index 84c6012ff4..82ea27f5cb 100644 --- a/tests/data/mobileiron_sentry.json +++ b/tests/data/mobileiron_sentry.json @@ -1019,7 +1019,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/nios.json b/tests/data/nios.json index 6ccd4dd6ee..7581efb612 100644 --- a/tests/data/nios.json +++ b/tests/data/nios.json @@ -2131,7 +2131,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/omnipcx.json b/tests/data/omnipcx.json index b988ef6764..9ef5258cd6 100644 --- a/tests/data/omnipcx.json +++ b/tests/data/omnipcx.json @@ -580,7 +580,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/panos_vsys.json b/tests/data/panos_vsys.json index c775e1052c..580aba5903 100644 --- a/tests/data/panos_vsys.json +++ b/tests/data/panos_vsys.json @@ -13799,7 +13799,7 @@ "mempool_index": "30", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Slot-0 Management Swap", "mempool_perc": 21, diff --git a/tests/data/procera.json b/tests/data/procera.json index 72c76f9698..4fbd39a261 100644 --- a/tests/data/procera.json +++ b/tests/data/procera.json @@ -1917,7 +1917,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 65, diff --git a/tests/data/qnap.json b/tests/data/qnap.json index 5cd09ae46d..a3ec12c7f6 100644 --- a/tests/data/qnap.json +++ b/tests/data/qnap.json @@ -1880,7 +1880,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 6, diff --git a/tests/data/quantastor.json b/tests/data/quantastor.json index 0a65dabf0f..5d3e3a6869 100644 --- a/tests/data/quantastor.json +++ b/tests/data/quantastor.json @@ -1495,7 +1495,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/recoveryos.json b/tests/data/recoveryos.json index 42f5f8bc7c..3a5fea9ae1 100644 --- a/tests/data/recoveryos.json +++ b/tests/data/recoveryos.json @@ -825,7 +825,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/recoveryos_8024s.json b/tests/data/recoveryos_8024s.json index 32dbfa6c62..b40380e7e5 100644 --- a/tests/data/recoveryos_8024s.json +++ b/tests/data/recoveryos_8024s.json @@ -1777,7 +1777,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/solidserver.json b/tests/data/solidserver.json index 1f6c99f9ec..0c65152193 100644 --- a/tests/data/solidserver.json +++ b/tests/data/solidserver.json @@ -1233,7 +1233,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 4096, "mempool_descr": "Swap space (total)", "mempool_perc": 1, diff --git a/tests/data/sophos-xg.json b/tests/data/sophos-xg.json index 3bfc262bfb..ab5a408483 100644 --- a/tests/data/sophos-xg.json +++ b/tests/data/sophos-xg.json @@ -5533,7 +5533,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 1024, "mempool_descr": "Swap space", "mempool_perc": 0, diff --git a/tests/data/truenas.json b/tests/data/truenas.json index ab8413e899..2a25eddf2d 100644 --- a/tests/data/truenas.json +++ b/tests/data/truenas.json @@ -2351,7 +2351,7 @@ "mempool_index": "10", "entPhysicalIndex": null, "mempool_type": "hrstorage", - "mempool_class": "virtual", + "mempool_class": "swap", "mempool_precision": 4096, "mempool_descr": "Swap space", "mempool_perc": 0,