mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@314 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -22,11 +22,11 @@
|
|||||||
$ifDescr = shell_exec($config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ifDescr.$ifIndex");
|
$ifDescr = shell_exec($config['snmpget'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'] . " ifDescr.$ifIndex");
|
||||||
$ifDescr = str_replace("No Such Object available on this agent at this OID", "", $ifDescr);
|
$ifDescr = str_replace("No Such Object available on this agent at this OID", "", $ifDescr);
|
||||||
$ifDescr = str_replace("No Such Instance currently exists at this OID", "", $ifDescr);
|
$ifDescr = str_replace("No Such Instance currently exists at this OID", "", $ifDescr);
|
||||||
|
$ifDescr = trim(str_replace("\"", "", $ifDescr));
|
||||||
} else { $ifDescr = trim(str_replace("\"", "", $ifName)); }
|
} else { $ifDescr = trim(str_replace("\"", "", $ifName)); }
|
||||||
|
|
||||||
if(!strstr($entry, "irtual")) {
|
if(!strstr($entry, "irtual")) {
|
||||||
$ifName = trim(str_replace("\"", "", $ifName));
|
$if = trim(strtolower($ifDescr));
|
||||||
$if = trim(strtolower($ifName));
|
|
||||||
$nullintf = 0;
|
$nullintf = 0;
|
||||||
foreach($config['bad_if'] as $bi) {
|
foreach($config['bad_if'] as $bi) {
|
||||||
if (strstr($if, $bi)) {
|
if (strstr($if, $bi)) {
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
# Add Interface
|
# Add Interface
|
||||||
echo("+");
|
echo("+");
|
||||||
} else {
|
} else {
|
||||||
mysql_query("UPDATE `interfaces` SET `deleted` = '0', `ifDescr` = '$ifDescr' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex' AND `deleted` = '1'");
|
mysql_query("UPDATE `interfaces` SET `deleted` = '0', `ifDescr` = '$ifDescr' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'");
|
||||||
if(mysql_affected_rows()) {
|
if(mysql_affected_rows()) {
|
||||||
echo("*");
|
echo("*");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user