mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
- 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:
+12
-1
@@ -25,7 +25,18 @@ $row = 1;
|
||||
|
||||
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'];
|
||||
$used = $drive['hrStorageUsed'] * $drive['hrStorageAllocationUnits'];
|
||||
|
||||
@@ -83,5 +83,6 @@ $config['ignore_mount_string'] = array("packages", "devfs", "procfs", "UMA", "MA
|
||||
$config['ignore_mount_regexp'] = array();
|
||||
$config['ignore_mount_removable'] = 1; # Ignore removable disk 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%
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user