From 6eb160aa8d557a93452249c970347288b178cb66 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Thu, 28 Jan 2010 19:18:00 +0000 Subject: [PATCH] also allow ignoring network mounts git-svn-id: http://www.observium.org/svn/observer/trunk@741 61d68cd4-352d-0410-923a-c4978735b2b8 --- config.php.default | 1 + includes/discovery/storage.php | 1 + 2 files changed, 2 insertions(+) diff --git a/config.php.default b/config.php.default index f02197070..ff391637d 100755 --- a/config.php.default +++ b/config.php.default @@ -136,6 +136,7 @@ $config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts", "/pro $config['ignore_mount_regexp'] = array(); $config['ignore_mount_string'] = array("/.*\/dev\/?$/"); $config['ignore_mount_removable'] = 0; # Ignore removable disk storage +$config['ignore_mount_network'] = 0; # Ignore network mounted storage ### Hardcoded ASN descriptions diff --git a/includes/discovery/storage.php b/includes/discovery/storage.php index 0cb643e02..1e23ae461 100755 --- a/includes/discovery/storage.php +++ b/includes/discovery/storage.php @@ -20,6 +20,7 @@ foreach($config['ignore_mount_string'] as $bi) { if(strpos($descr, $bi) !== FALSE) { $allow = 0; if ($debug) echo("$descr, $bi \n"); } } foreach($config['ignore_mount_regexp'] as $bi) { if(preg_match($bi, $descr)) { $allow = 0; if ($debug) echo("$bi, $descr \n"); } } if (isset($config['ignore_mount_removable']) && $config['ignore_mount_removable'] && $fstype == "hrStorageRemovableDisk") { $allow = 0; if ($debug) echo("removable, skipping\n"); } + if (isset($config['ignore_mount_network']) && $config['ignore_mount_network'] && $fstype == "hrStorageNetworkDisk") { $allow = 0; if ($debug) echo("network, skipping\n"); } $descr = str_replace("mounted on: ", "", $descr); $descr = str_replace(": var file system", "", $descr);