Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Professional Edition
-
None
Description
Hi,
We wrote a patch for the file "includes/discovery/graphs/juniper-firewall-mib.inc.php".
It's similar to the ignore_mount_regexp config option, but for Juniper Firewall.
We have a lot of filters because of bgp flowspec, and observium is creating a lot of graphics and rrds that are not necessary in our case. There were so many new files created that the server's disk filled up.
Patch: includes/discovery/graphs/juniper-firewall-mib.inc.php
$fws = [];
|
$fws = snmpwalk_cache_threepart_oid($device, "jnxFWCounterDisplayType", $fws, "JUNIPER-FIREWALL-MIB");
|
if (count($fws)) {
|
$oid = 'jnxFWCounterDisplayType';
|
}
|
|
$array = [];
|
|
foreach ($fws as $filter => $counters) {
|
foreach ($counters as $counter => $types) {
|
foreach ($types as $type => $data) {
|
if (isset($config['bad_fw_filter_regexp'])) {
|
$should_include = true;
|
|
foreach ((array)$config['bad_fw_filter_regexp'] as $bi) {
|
if (preg_match($bi, $filter)) {
|
$should_include = false;
|
continue;
|
}
|
}
|
|
if ($should_include) {
|
$array[$filter][$counter][$type] = 1;
|
}
|
}
|
}
|
}
|
}
|
Thanks.