mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Ignore empty interfaces (for some reason every Active Directory entry gets reports as an interface)
git-svn-id: http://www.observium.org/svn/observer/trunk@1773 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -17,7 +17,6 @@ foreach(explode("\n", $ports) as $entry){
|
|||||||
|
|
||||||
$entry = trim($entry);
|
$entry = trim($entry);
|
||||||
list($ifIndex, $ifDescr) = explode("||", $entry, 2);
|
list($ifIndex, $ifDescr) = explode("||", $entry, 2);
|
||||||
|
|
||||||
if(!strstr($entry, "irtual")) {
|
if(!strstr($entry, "irtual")) {
|
||||||
$if = trim(strtolower($ifDescr));
|
$if = trim(strtolower($ifDescr));
|
||||||
$nullintf = 0;
|
$nullintf = 0;
|
||||||
@@ -30,6 +29,7 @@ foreach(explode("\n", $ports) as $entry){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($ifDescr)) { $nullintf = 1; }
|
||||||
if($device['os'] == "catos" && strstr($if, "vlan") ) { $nullintf = 1; }
|
if($device['os'] == "catos" && strstr($if, "vlan") ) { $nullintf = 1; }
|
||||||
$ifDescr = fixifName($ifDescr);
|
$ifDescr = fixifName($ifDescr);
|
||||||
if (preg_match('/serial[0-9]:/', $if)) { $nullintf = 1; }
|
if (preg_match('/serial[0-9]:/', $if)) { $nullintf = 1; }
|
||||||
|
|||||||
Reference in New Issue
Block a user