mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
allow ignoring of removable disks - this includes loopmounts on linux at least, so we get rid of all those pesky 100% storages
git-svn-id: http://www.observium.org/svn/observer/trunk@740 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -135,6 +135,7 @@ $config['allow_entity_sensor']['specialEnum'] = 1;
|
||||
$config['ignore_mount'] = array("/kern", "/mnt/cdrom", "/dev", "/dev/pts", "/proc/bus/usb");
|
||||
$config['ignore_mount_regexp'] = array();
|
||||
$config['ignore_mount_string'] = array("/.*\/dev\/?$/");
|
||||
$config['ignore_mount_removable'] = 0; # Ignore removable disk storage
|
||||
|
||||
### Hardcoded ASN descriptions
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
foreach($config['ignore_mount'] as $bi) { if($bi == $descr) { $allow = 0; if ($debug) echo("$bi == $descr \n"); } }
|
||||
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"); }
|
||||
$descr = str_replace("mounted on: ", "", $descr);
|
||||
$descr = str_replace(": var file system", "", $descr);
|
||||
|
||||
|
Reference in New Issue
Block a user