mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
- Ignored some FreeBSD OS drives.
git-svn-id: http://www.observium.org/svn/observer/trunk@958 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@ -20,6 +20,14 @@ if(mysql_result(mysql_query("SELECT count(storage_id) from storage WHERE device_
|
|||||||
$drive["storage_descr"] = preg_replace("/.*mounted on: (.*)/", "\\1", $drive["storage_descr"]);
|
$drive["storage_descr"] = preg_replace("/.*mounted on: (.*)/", "\\1", $drive["storage_descr"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($device['os'] == "freebsd") {
|
||||||
|
foreach ($config['ignore_bsd_os_drives'] as $jdrive) {
|
||||||
|
if (preg_match($jdrive, $drive["storage_descr"])) {
|
||||||
|
$skipdrive = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($skipdrive) { continue; }
|
if ($skipdrive) { continue; }
|
||||||
if(is_integer($drive_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if(is_integer($drive_rows/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
$perc = round($drive['storage_perc'], 0);
|
$perc = round($drive['storage_perc'], 0);
|
||||||
|
@ -35,6 +35,14 @@ while($drive = mysql_fetch_array($query)) {
|
|||||||
$drive["storage_descr"] = preg_replace("/.*mounted on: (.*)/", "\\1", $drive["storage_descr"]);
|
$drive["storage_descr"] = preg_replace("/.*mounted on: (.*)/", "\\1", $drive["storage_descr"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($device['os'] == "freebsd") {
|
||||||
|
foreach ($config['ignore_bsd_os_drives'] as $jdrive) {
|
||||||
|
if (preg_match($jdrive, $drive["storage_descr"])) {
|
||||||
|
$skipdrive = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($skipdrive) { continue; }
|
if ($skipdrive) { continue; }
|
||||||
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
if(is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
|
||||||
|
|
||||||
|
@ -96,6 +96,7 @@ $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("/on: \/packages/", "/on: \/dev/", "/on: \/proc/", "^/\/junos$/", "^/\/junos\/dev/$", "/^\/jail\/dev$/"); # Ignore JunOS partitions who are always 100%
|
$config['ignore_junos_os_drives'] = array("/on: \/packages/", "/on: \/dev/", "/on: \/proc/", "^/\/junos$/", "^/\/junos\/dev/$", "/^\/jail\/dev$/"); # Ignore JunOS partitions who are always 100%
|
||||||
|
$config['ignore_bsd_os_drives'] = array("/^\/dev$/", "/^\/var\/dhcpd\/dev$/", "/^UMA:/"); # Ignore BSD partitions who are always 100%
|
||||||
|
|
||||||
# Ports
|
# Ports
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user