From d0eab1c02b1af5e8e5c581c8c894a79ca9474663 Mon Sep 17 00:00:00 2001 From: laf Date: Sun, 13 Dec 2015 18:02:24 +0000 Subject: [PATCH] Moved memory graphs for vmware to mempool polling --- includes/discovery/mempools/hrstorage.inc.php | 4 ++++ includes/discovery/storage/hrstorage.inc.php | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/includes/discovery/mempools/hrstorage.inc.php b/includes/discovery/mempools/hrstorage.inc.php index acef0138f..5a853245a 100644 --- a/includes/discovery/mempools/hrstorage.inc.php +++ b/includes/discovery/mempools/hrstorage.inc.php @@ -31,6 +31,10 @@ if (is_array($storage_array)) { break; } + if ($device['os'] == 'vmware' && $descr == 'Real Memory') { + $deny = 0; + } + if ($device['os'] == 'routeros' && $descr == 'main memory') { $deny = 0; } diff --git a/includes/discovery/storage/hrstorage.inc.php b/includes/discovery/storage/hrstorage.inc.php index 46907e10a..04012237b 100644 --- a/includes/discovery/storage/hrstorage.inc.php +++ b/includes/discovery/storage/hrstorage.inc.php @@ -33,6 +33,13 @@ if (is_array($hrstorage_array)) { break; } + if ($device['os'] == 'vmware' && $descr == 'Real Memory') { + $old_rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('storage-hrstorage-'.safename($descr).'.rrd'); + $new_rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('mempool-hrstorage-'.$storage['hrStorageIndex'].'.rrd'); + rename($old_rrdfile, $new_rrdfile); + $deny = 1; + } + foreach ($config['ignore_mount'] as $bi) { if ($bi == $descr) { $deny = 1;