From 588491a1f10df62ba334c9eddb69c57d8676551f Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Fri, 13 Aug 2010 14:23:05 +0000 Subject: [PATCH] fix bits_trio (this should be a specific type for its purpose, i think) git-svn-id: http://www.observium.org/svn/observer/trunk@1680 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/graphs/multiport/bits_trio.inc.php | 2 +- includes/discovery/ports.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/html/includes/graphs/multiport/bits_trio.inc.php b/html/includes/graphs/multiport/bits_trio.inc.php index 428c6f7d7..8ac24a4df 100644 --- a/html/includes/graphs/multiport/bits_trio.inc.php +++ b/html/includes/graphs/multiport/bits_trio.inc.php @@ -41,7 +41,7 @@ if($_GET['legend']) { $legend = $_GET['legend']; } foreach(explode(",", $_GET['idc']) as $ifid) { $query = mysql_query("SELECT `ifIndex`, `hostname` FROM `id` AS I, devices as D WHERE I.interface_id = '" . $ifid . "' AND I.device_id = D.device_id"); $int = mysql_fetch_row($query); - if(is_file($config['rrd_dir'] . "/" . $int[1] . "/" . $int[0] . ".rrd")) { + if(is_file($config['rrd_dir'] . "/" . $int[1] . "/port-" . $int[0] . ".rrd")) { if(strstr($inverse, "c")) { $in = "OUT"; $out = "IN"; } else { $in = "IN"; $out = "OUT"; } $rrd_options .= " DEF:inoctetsc" . $i . "=" . $config['rrd_dir'] . "/" . $int[1] . "/port-" . $int[0] . ".rrd:".$in."OCTETS:AVERAGE"; $rrd_options .= " DEF:outoctetsc" . $i . "=" . $config['rrd_dir'] . "/" . $int[1] . "/port-" . $int[0] . ".rrd:".$out."OCTETS:AVERAGE"; diff --git a/includes/discovery/ports.inc.php b/includes/discovery/ports.inc.php index 4b4e4abb8..ceefd4d8a 100755 --- a/includes/discovery/ports.inc.php +++ b/includes/discovery/ports.inc.php @@ -40,7 +40,7 @@ foreach(explode("\n", $ports) as $entry){ if ($nullintf == 0) { if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') { mysql_query("INSERT INTO `ports` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifDescr')"); -# Add Interface + # Add Interface echo("+"); } else { mysql_query("UPDATE `ports` SET `deleted` = '0' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"); @@ -48,10 +48,10 @@ foreach(explode("\n", $ports) as $entry){ } $int_exists[] = "$ifIndex"; } else { -# Ignored Interface + # Ignored Interface if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) != '0') { mysql_query("UPDATE `ports` SET `deleted` = '1' WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"); -# Delete Interface + # Delete Interface echo("-"); ## Deleted Interface } else { echo("X"); ## Ignored Interface