- Added default config item to filter JunOS system partitions from the GUI.

Setting: ignore_junos_os_drives
  Default: /packages, /dev and /proc


git-svn-id: http://www.observium.org/svn/observer/trunk@896 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Geert Hauwaerts
2010-02-21 00:29:47 +00:00
parent dd170df1de
commit 33d5200edd
2 changed files with 13 additions and 1 deletions
+12 -1
View File
@@ -25,7 +25,18 @@ $row = 1;
while($drive = mysql_fetch_array($query)) { while($drive = mysql_fetch_array($query)) {
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } $skipdrive = 0;
if ($drive["os"] == "junos") {
foreach ($config['ignore_junos_os_drives'] as $jdrive) {
if (preg_match($jdrive, $drive["hrStorageDescr"])) {
$skipdrive = 1;
}
}
}
if ($skipdrive) { continue; }
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
$total = $drive['hrStorageSize'] * $drive['hrStorageAllocationUnits']; $total = $drive['hrStorageSize'] * $drive['hrStorageAllocationUnits'];
$used = $drive['hrStorageUsed'] * $drive['hrStorageAllocationUnits']; $used = $drive['hrStorageUsed'] * $drive['hrStorageAllocationUnits'];
+1
View File
@@ -83,5 +83,6 @@ $config['ignore_mount_string'] = array("packages", "devfs", "procfs", "UMA", "MA
$config['ignore_mount_regexp'] = array(); $config['ignore_mount_regexp'] = array();
$config['ignore_mount_removable'] = 1; # Ignore removable disk storage $config['ignore_mount_removable'] = 1; # Ignore removable disk storage
$config['ignore_mount_network'] = 1; # Ignore network mounted storage $config['ignore_mount_network'] = 1; # Ignore network mounted storage
$config['ignore_junos_os_drives'] = array("/, \/packages/", "/, \/dev/", "/, \/proc/"); # Ignore JunOS partitions who are always 100%
?> ?>