syntaxer run

git-svn-id: http://www.observium.org/svn/observer/trunk@2643 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2011-10-04 14:38:54 +00:00
parent 2dc8b807e9
commit a369c442eb
113 changed files with 0 additions and 232 deletions
-2
View File
@@ -72,7 +72,6 @@ if (isset($options['d']))
# ini_set('error_reporting', 0); # ini_set('error_reporting', 0);
} }
if (!$where) if (!$where)
{ {
echo("-h <device id> | <device hostname wildcard> Poll single device\n"); echo("-h <device id> | <device hostname wildcard> Poll single device\n");
@@ -179,7 +178,6 @@ if(!isset($options['q'])) {
echo("\n"); echo("\n");
} }
logfile($string); logfile($string);
?> ?>
-1
View File
@@ -184,7 +184,6 @@ $lineplot->SetFillColor("#d5d5d5@0.5");
#$lineplot2->SetColor("#d5d5d5"); #$lineplot2->SetColor("#d5d5d5");
#$lineplot2->SetFillColor("#d5d5d5@0.5"); #$lineplot2->SetFillColor("#d5d5d5@0.5");
$lineplot_in = new LinePlot($in_data, $ticks); $lineplot_in = new LinePlot($in_data, $ticks);
$lineplot_in->SetLegend("Traffic In"); $lineplot_in->SetLegend("Traffic In");
-2
View File
@@ -5,7 +5,6 @@ function generate_link($text, $vars, $new_vars = array())
return '<a href="'.generate_url($vars, $new_vars).'">'.$text.'</a>'; return '<a href="'.generate_url($vars, $new_vars).'">'.$text.'</a>';
} }
function generate_url($vars, $new_vars = array()) function generate_url($vars, $new_vars = array())
{ {
@@ -42,7 +41,6 @@ function generate_overlib_content($graph_array, $text)
} }
function get_percentage_colours($percentage) function get_percentage_colours($percentage)
{ {
@@ -6,7 +6,6 @@ include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-apache-".$app['app_id'].".rrd"; $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-apache-".$app['app_id'].".rrd";
$array = array('sb_reading' => array('descr' => 'Reading', 'colour' => '750F7DFF'), $array = array('sb_reading' => array('descr' => 'Reading', 'colour' => '750F7DFF'),
'sb_writing' => array('descr' => 'Writing', 'colour' => '00FF00FF'), 'sb_writing' => array('descr' => 'Writing', 'colour' => '00FF00FF'),
'sb_wait' => array('descr' => 'Waiting', 'colour' => '4444FFFF'), 'sb_wait' => array('descr' => 'Waiting', 'colour' => '4444FFFF'),
@@ -19,7 +18,6 @@ $array = array('sb_reading' => array('descr' => 'Reading', 'colour' => '750F7DFF
'sb_idle' => array('descr' => 'Idle', 'colour' => 'FF4105FF'), 'sb_idle' => array('descr' => 'Idle', 'colour' => 'FF4105FF'),
); );
$i = 0; $i = 0;
if (is_file($rrd_filename)) if (is_file($rrd_filename))
{ {
@@ -39,5 +37,4 @@ $unit_text = "Workers";
include("includes/graphs/generic_multi_simplex_seperated.inc.php"); include("includes/graphs/generic_multi_simplex_seperated.inc.php");
?> ?>
-3
View File
@@ -15,7 +15,4 @@ if (is_numeric($id))
} }
} }
?> ?>
-1
View File
@@ -36,7 +36,6 @@ if($bill['bill_type'] == "cdr") {
$custom_graph .= " HRULE:" . $rates['rate_average'] * 1000 * -1 . "#cc0000"; $custom_graph .= " HRULE:" . $rates['rate_average'] * 1000 * -1 . "#cc0000";
} }
include("includes/graphs/generic_multi_bits_separated.inc.php"); include("includes/graphs/generic_multi_bits_separated.inc.php");
?> ?>
-2
View File
@@ -10,14 +10,12 @@ if ($_GET['legend'] == "no") { $rrd_options = " -g"; }
if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' "; } if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$graph_title."' "; }
if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; } if (isset($_GET['graph_title'])) { $rrd_options .= " --title='".$_GET['graph_title']."' "; }
#if (!isset($scale_min) && !isset($scale_max)) { $rrd_options .= " --alt-autoscale-max"; } #if (!isset($scale_min) && !isset($scale_max)) { $rrd_options .= " --alt-autoscale-max"; }
if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; } if (isset($scale_min)) { $rrd_options .= " -l $scale_min"; }
if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; } if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; }
if (isset($scale_rigid)) { $rrd_options .= " -r"; } if (isset($scale_rigid)) { $rrd_options .= " -r"; }
$rrd_options .= " -E --start ".$from." --end " . $to . " --width ".$width." --height ".$height." "; $rrd_options .= " -E --start ".$from." --end " . $to . " --width ".$width." --height ".$height." ";
$rrd_options .= $config['rrdgraph_def_text']; $rrd_options .= $config['rrdgraph_def_text'];
@@ -108,7 +108,6 @@ function error500($title, $msg) {
return error(500, "Not found", $title, $msg); return error(500, "Not found", $title, $msg);
} }
/** /**
* Incomplete / invalid request * Incomplete / invalid request
*/ */
@@ -210,7 +209,6 @@ if ($height < "99") { $rrd_cmd .= " --only-graph "; }
if ($width <= "300") { $rrd_cmd .= " --font LEGEND:7:" . $config['mono_font'] . " --font AXIS:6:" . $config['mono_font'] . " "; } if ($width <= "300") { $rrd_cmd .= " --font LEGEND:7:" . $config['mono_font'] . " --font AXIS:6:" . $config['mono_font'] . " "; }
else { $rrd_cmd .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font'] . " "; } else { $rrd_cmd .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font'] . " "; }
if (isset($_GET['debug'])) { if (isset($_GET['debug'])) {
header('Content-Type: text/plain; charset=utf-8'); header('Content-Type: text/plain; charset=utf-8');
printf("Would have executed:\n%s\n", $rrd_cmd); printf("Would have executed:\n%s\n", $rrd_cmd);
@@ -14,5 +14,4 @@ include("includes/graphs/device/diskio_common.inc.php");
include("includes/graphs/generic_multi_bits_separated.inc.php"); include("includes/graphs/generic_multi_bits_separated.inc.php");
?> ?>
@@ -15,5 +15,4 @@ foreach (dbFetchRows("SELECT * FROM `ucd_diskio` AS U, `devices` AS D WHERE D.de
} }
} }
?> ?>
@@ -10,7 +10,6 @@ $scale_rigid = TRUE;
include("includes/graphs/common.inc.php"); include("includes/graphs/common.inc.php");
include("smokeping_common.inc.php"); include("smokeping_common.inc.php");
$i = 0; $i = 0;
$pings = 20; $pings = 20;
$iter = 0; $iter = 0;
@@ -23,7 +22,6 @@ if($width > "500")
$descr_len = 12 + round(($width - 250) / 8); $descr_len = 12 + round(($width - 250) / 8);
} }
if($width > "500") if($width > "500")
{ {
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev\l'"; $rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev\l'";
@@ -87,7 +85,6 @@ foreach ($smokeping_files[$direction][$device['hostname']] as $source => $filena
$rrd_options .= " GPRINT:avsd$i:'%5.1lf%Ss'"; $rrd_options .= " GPRINT:avsd$i:'%5.1lf%Ss'";
$rrd_options .= " GPRINT:avmsr$i:'%5.1lf%s\\l'"; $rrd_options .= " GPRINT:avmsr$i:'%5.1lf%s\\l'";
$i++; $i++;
} }
@@ -9,7 +9,6 @@ if ($rrd_filename) { $rrd_filename_out = $rrd_filename; $rrd_filename_in = $rrd_
if ($inverse) { $in = 'out'; $out = 'in'; } else { $in = 'in'; $out = 'out'; } if ($inverse) { $in = 'out'; $out = 'in'; } else { $in = 'in'; $out = 'out'; }
if ($multiplier) if ($multiplier)
{ {
$rrd_options .= " DEF:p".$out."octets=".$rrd_filename_out.":".$ds_out.":AVERAGE"; $rrd_options .= " DEF:p".$out."octets=".$rrd_filename_out.":".$ds_out.":AVERAGE";
@@ -74,9 +74,6 @@ foreach ($rrd_list as $rrd)
$i++; $iter++; $i++; $iter++;
} }
if ($custom_graph) { $rrd_options .= $custom_graph; } if ($custom_graph) { $rrd_options .= $custom_graph; }
$rrd_options .= $rrd_optionsb; $rrd_options .= $rrd_optionsb;
@@ -10,7 +10,6 @@ if($width > "500")
$descr_len += round(($width - 250) / 8); $descr_len += round(($width - 250) / 8);
} }
if ($nototal) { $descrlen += "2"; $unitlen += "2";} if ($nototal) { $descrlen += "2"; $unitlen += "2";}
$unit_text = str_pad(truncate($unit_text,$unitlen),$unitlen); $unit_text = str_pad(truncate($unit_text,$unitlen),$unitlen);
@@ -67,7 +67,6 @@ foreach ($rrd_list as $i => $rrd)
$t_defname = $g_defname; $t_defname = $g_defname;
} }
$rrd_options .= " AREA:".$g_defname.$i."#".$colour.":'".substr(str_pad($rrd['descr'], $descrlen),0,$descrlen)."':$stack"; $rrd_options .= " AREA:".$g_defname.$i."#".$colour.":'".substr(str_pad($rrd['descr'], $descrlen),0,$descrlen)."':$stack";
$rrd_options .= " GPRINT:".$t_defname.$i.":LAST:%6.2lf%s".str_replace("%", "%%", $units).""; $rrd_options .= " GPRINT:".$t_defname.$i.":LAST:%6.2lf%s".str_replace("%", "%%", $units)."";
$rrd_options .= " GPRINT:".$t_defname.$i."max:MAX:%6.2lf%s".str_replace("%", "%%", $units).""; $rrd_options .= " GPRINT:".$t_defname.$i."max:MAX:%6.2lf%s".str_replace("%", "%%", $units)."";
@@ -10,7 +10,6 @@ $rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = "Upstream"; $rrd_list[1]['descr'] = "Upstream";
$rrd_list[1]['ds'] = "AtucChanCurrTxRate"; $rrd_list[1]['ds'] = "AtucChanCurrTxRate";
$unit_text = "Bits/sec"; $unit_text = "Bits/sec";
$units=''; $units='';
-2
View File
@@ -50,5 +50,3 @@ if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'])
<!-- ///// end of gumax-header ///// --> <!-- ///// end of gumax-header ///// -->
-1
View File
@@ -26,7 +26,6 @@ $type = strtolower($device['os']);
if ($device['os'] == "ios") { formatCiscoHardware($device, true); } if ($device['os'] == "ios") { formatCiscoHardware($device, true); }
$device['os_text'] = $config['os'][$device['os']]['text']; $device['os_text'] = $config['os'][$device['os']]['text'];
echo(' <tr class="'.$class.'" bgcolor="' . $bg . '" onmouseover="this.style.backgroundColor=\'#fdd\';" onmouseout="this.style.backgroundColor=\'' . $bg . '\';" echo(' <tr class="'.$class.'" bgcolor="' . $bg . '" onmouseover="this.style.backgroundColor=\'#fdd\';" onmouseout="this.style.backgroundColor=\'' . $bg . '\';"
onclick="location.href=\'device/'.$device['device_id'].'/\'" style="cursor: pointer;"> onclick="location.href=\'device/'.$device['device_id'].'/\'" style="cursor: pointer;">
<td width="300"><span style="font-size: 15px;">' . generate_device_link($device) . '</span></td>' <td width="300"><span style="font-size: 15px;">' . generate_device_link($device) . '</span></td>'
-1
View File
@@ -247,7 +247,6 @@ if ($port_details)
} }
} }
unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br); unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br);
echo("</td></tr>"); echo("</td></tr>");
-16
View File
@@ -40,7 +40,6 @@ if (isset($config['enable_bgp']) && $config['enable_bgp'])
</ul> </ul>
</div> </div>
</div> </div>
</li> </li>
@@ -167,7 +166,6 @@ $(document).ready(function() {
}); });
</script> </script>
</div><!-- End 4 columns container --> </div><!-- End 4 columns container -->
</li><!-- End 4 columns Item --> </li><!-- End 4 columns Item -->
@@ -207,8 +205,6 @@ if ($config['show_locations'])
} }
?> ?>
<!-- PORTS --> <!-- PORTS -->
<li><a href="ports/" class="drop"><img src="images/16/connect.png" border="0" align="absmiddle" /> Ports</a><!-- Begin Home Item --> <li><a href="ports/" class="drop"><img src="images/16/connect.png" border="0" align="absmiddle" /> Ports</a><!-- Begin Home Item -->
@@ -308,12 +304,10 @@ $(document).ready(function() {
}); });
</script> </script>
</div><!-- End 4 columns container --> </div><!-- End 4 columns container -->
</li><!-- End 4 columns Item --> </li><!-- End 4 columns Item -->
<?php <?php
# FIXME does not check user permissions... # FIXME does not check user permissions...
@@ -417,7 +411,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
'); ');
} }
## BGP Sessions ## BGP Sessions
if ($_SESSION['userlevel'] >= '5' && $routing_count['bgp']) if ($_SESSION['userlevel'] >= '5' && $routing_count['bgp'])
{ {
@@ -437,7 +430,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
'); ');
} }
echo(' </ul>'); echo(' </ul>');
?> ?>
@@ -449,17 +441,14 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
} }
?> ?>
<li class="menu_right"><a href="#" class="drop"><img src="images/16/wrench.png" border="0" align="absmiddle" /> System</a><!-- Begin Home Item --> <li class="menu_right"><a href="#" class="drop"><img src="images/16/wrench.png" border="0" align="absmiddle" /> System</a><!-- Begin Home Item -->
<div class="dropdown_3columns align_right"><!-- Begin 2 columns container --> <div class="dropdown_3columns align_right"><!-- Begin 2 columns container -->
<div class="col_3"> <div class="col_3">
<h2>Observium <?php echo($config['version']); ?> </h2> <h2>Observium <?php echo($config['version']); ?> </h2>
</div> </div>
<div class="col_2"> <div class="col_2">
<p>Network Management and Monitoring<br /> <p>Network Management and Monitoring<br />
Copyright (C) 2006-<?php echo date("Y"); ?> Adam Armstrong</p> Copyright (C) 2006-<?php echo date("Y"); ?> Adam Armstrong</p>
@@ -488,7 +477,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
</p> </p>
</div> </div>
<div class="col_1"> <div class="col_1">
<h2>Settings</h2> <h2>Settings</h2>
<ul> <ul>
@@ -502,7 +490,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
</ul> </ul>
</div> </div>
<?php <?php
$apache_version = str_replace("Apache/", "", $_SERVER['SERVER_SOFTWARE']); $apache_version = str_replace("Apache/", "", $_SERVER['SERVER_SOFTWARE']);
$php_version = phpversion(); $php_version = phpversion();
@@ -542,12 +529,9 @@ $netsnmp_version = shell_exec($config['snmpget'] . " --version");
<li><a href="authlog/"><img src="images/16/lock.png" border="0" align="absmiddle" /> Authlog</a></li>'); <li><a href="authlog/"><img src="images/16/lock.png" border="0" align="absmiddle" /> Authlog</a></li>');
} ?> } ?>
</ul> </ul>
</div> </div>
</div><!-- End 2 columns container --> </div><!-- End 2 columns container -->
</li><!-- End Home Item --> </li><!-- End Home Item -->
-1
View File
@@ -8,7 +8,6 @@ if (device_permitted($entry['device_id']))
echo("<tr style=\"background-color: $bg_colour\"> echo("<tr style=\"background-color: $bg_colour\">
<td width=0></td>"); <td width=0></td>");
$entry['hostname'] = shorthost($entry['hostname'], 20); $entry['hostname'] = shorthost($entry['hostname'], 20);
if ($_GET['page'] != "device") if ($_GET['page'] != "device")
-3
View File
@@ -95,7 +95,6 @@ foreach ($_POST as $name => $value)
$vars[$name] = $value; $vars[$name] = $value;
} }
if(strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; } if(strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; }
if(strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); } if(strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); }
@@ -175,7 +174,6 @@ if ($config['page_refresh']) { echo("<meta http-equiv='refresh' content='".$conf
var trigger = $('.trigger', this); var trigger = $('.trigger', this);
var info = $('.popup', this).css('opacity', 0); var info = $('.popup', this).css('opacity', 0);
$([trigger.get(0), info.get(0)]).mouseover(function () { $([trigger.get(0), info.get(0)]).mouseover(function () {
if (hideDelayTimer) clearTimeout(hideDelayTimer); if (hideDelayTimer) clearTimeout(hideDelayTimer);
if (beingShown || shown) { if (beingShown || shown) {
@@ -260,7 +258,6 @@ if($devel || $vars['devel'])
echo("</pre>"); echo("</pre>");
} }
if ($_SESSION['authenticated']) if ($_SESSION['authenticated'])
{ {
## Authenticated. Print a page. ## Authenticated. Print a page.
-1
View File
@@ -155,7 +155,6 @@ print_optionbar_end();
<a href="http://www.facebook.com/pages/Observer/128354461353">Facebook</a> <a href="http://www.facebook.com/pages/Observer/128354461353">Facebook</a>
</p> </p>
<h3>Observium is a Free, Open project. Please donate to support continued development.</h3> <h3>Observium is a Free, Open project. Please donate to support continued development.</h3>
<div style="margin-top:10px;"> <div style="margin-top:10px;">
-1
View File
@@ -210,7 +210,6 @@ if (bill_permitted($bill_id))
$bi .= "&amp;from=" . $unixfrom . "&amp;to=" . $unixto; $bi .= "&amp;from=" . $unixfrom . "&amp;to=" . $unixto;
$bi .= "&amp;width=715&amp;height=200&amp;total=1'>"; $bi .= "&amp;width=715&amp;height=200&amp;total=1'>";
$li = "<img src='graph.php?type=bill_bits&amp;id=" . $bill_id; $li = "<img src='graph.php?type=bill_bits&amp;id=" . $bill_id;
$li .= "&amp;from=" . $unix_prev_from . "&amp;to=" . $unix_prev_to; $li .= "&amp;from=" . $unix_prev_from . "&amp;to=" . $unix_prev_to;
$li .= "&amp;width=715&amp;height=200&amp;total=1'>"; $li .= "&amp;width=715&amp;height=200&amp;total=1'>";
-2
View File
@@ -16,8 +16,6 @@ echo("
<input type=submit value=' Yes, please delete this bill! ' name='Delete'></form> <input type=submit value=' Yes, please delete this bill! ' name='Delete'></form>
"); ");
?> ?>
-2
View File
@@ -111,6 +111,4 @@ echo("</select></td></tr><tr>
</select></td> </select></td>
</tr><tr></table><input type='submit' name='Submit' value=' Add '></form>"); </tr><tr></table><input type='submit' name='Submit' value=' Add '></form>");
?> ?>
-2
View File
@@ -57,7 +57,6 @@ if ($_GET['opta'] == "add")
<td><input type="textarea" name="bill_notes" size="32"></td> <td><input type="textarea" name="bill_notes" size="32"></td>
</tr> </tr>
<tr> <tr>
<td></td><td><input type="submit" class="submit" name="Submit" value=" Add Bill "></td> <td></td><td><input type="submit" class="submit" name="Submit" value=" Add Bill "></td>
</tr> </tr>
@@ -65,7 +64,6 @@ if ($_GET['opta'] == "add")
</div> </div>
</form> </form>
<?php <?php
} else { } else {
-2
View File
@@ -1,6 +1,4 @@
<?php <?php
?> ?>
-1
View File
@@ -52,7 +52,6 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `port_descr_type` = 'cust' GRO
</tr> </tr>
"); ");
unset($customer_name); unset($customer_name);
} }
-1
View File
@@ -278,7 +278,6 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
</li>'); </li>');
} }
if ($_SESSION['userlevel'] >= "7") if ($_SESSION['userlevel'] >= "7")
{ {
echo('<li class="' . $select['edit'] . '" style="float: right;"> echo('<li class="' . $select['edit'] . '" style="float: right;">
-1
View File
@@ -108,5 +108,4 @@ print_optionbar_end();
} }
?> ?>
-1
View File
@@ -16,7 +16,6 @@ if ($_SESSION['userlevel'] < '7')
$panes['alerts'] = 'Alerts'; $panes['alerts'] = 'Alerts';
$panes['modules'] = 'Modules'; $panes['modules'] = 'Modules';
if ($config['enable_services']) if ($config['enable_services'])
{ {
$panes['services'] = 'Services'; $panes['services'] = 'Services';
-1
View File
@@ -52,7 +52,6 @@ $descr = $device['purpose'];
$override_sysLocation_bool = get_dev_attrib($device,'override_sysLocation_bool'); $override_sysLocation_bool = get_dev_attrib($device,'override_sysLocation_bool');
$override_sysLocation_string = get_dev_attrib($device,'override_sysLocation_string'); $override_sysLocation_string = get_dev_attrib($device,'override_sysLocation_string');
if ($updated && $update_message) if ($updated && $update_message)
{ {
print_message($update_message); print_message($update_message);
-6
View File
@@ -52,7 +52,6 @@ foreach ($config['poller_modules'] as $module => $module_status)
echo(($module_status ? '<span class=green>enabled</span>' : '<span class=red>disabled</span>' )); echo(($module_status ? '<span class=green>enabled</span>' : '<span class=red>disabled</span>' ));
} }
echo('</td><td>'); echo('</td><td>');
echo('<form id="toggle_poller" name="toggle_poller" method="post" action=""> echo('<form id="toggle_poller" name="toggle_poller" method="post" action="">
@@ -61,7 +60,6 @@ foreach ($config['poller_modules'] as $module => $module_status)
</label> </label>
</form>'); </form>');
echo('</td></tr>'); echo('</td></tr>');
$i++; $i++;
} }
@@ -89,7 +87,6 @@ foreach ($config['discovery_modules'] as $module => $module_status)
echo(($module_status ? '<span class=green>enabled</span>' : '<span class=red>disabled</span>' )); echo(($module_status ? '<span class=green>enabled</span>' : '<span class=red>disabled</span>' ));
} }
echo('</td><td>'); echo('</td><td>');
echo('<form id="toggle_discovery" name="toggle_discovery" method="post" action=""> echo('<form id="toggle_discovery" name="toggle_discovery" method="post" action="">
@@ -98,14 +95,11 @@ foreach ($config['discovery_modules'] as $module => $module_status)
</label> </label>
</form>'); </form>');
echo('</td></tr>'); echo('</td></tr>');
$i++; $i++;
} }
echo('</table>'); echo('</table>');
echo('</div>'); echo('</div>');
?> ?>
-1
View File
@@ -1,4 +1,3 @@
<?php <?php
?> ?>
-1
View File
@@ -24,7 +24,6 @@ foreach (dbFetchRows("SELECT * FROM `ucd_diskio` WHERE device_id = ? ORDER BY di
$graph_array_zoom['from'] = $config['time']['twoday']; $graph_array_zoom['from'] = $config['time']['twoday'];
$graph_array_zoom['to'] = $config['time']['now']; $graph_array_zoom['to'] = $config['time']['now'];
echo("<tr bgcolor='$row_colour'><th>"); echo("<tr bgcolor='$row_colour'><th>");
echo(overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), NULL)); echo(overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), NULL));
echo("</th></tr>"); echo("</th></tr>");
-1
View File
@@ -29,7 +29,6 @@ unset($sep);
print_optionbar_end(); print_optionbar_end();
if($vars['view'] == "incoming") if($vars['view'] == "incoming")
{ {
-1
View File
@@ -13,5 +13,4 @@ foreach ($datas as $name=>$type)
include("includes/print-device-graph.php"); include("includes/print-device-graph.php");
} }
?> ?>
-1
View File
@@ -58,7 +58,6 @@ if ($services['total'])
echo("</div>"); echo("</div>");
} }
### FIXME - split this into overview/syslog.inc.php? ### FIXME - split this into overview/syslog.inc.php?
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id'])); $syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
if (count($syslog)) if (count($syslog))
-1
View File
@@ -77,7 +77,6 @@ foreach ($menu_options as $option => $text)
} }
unset($sep); unset($sep);
if (dbFetchCell("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$port['interface_id']."'") > "0" ) if (dbFetchCell("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$port['interface_id']."'") > "0" )
{ {
@@ -29,7 +29,6 @@ if ($vars['subview'] == "top10")
if (!isset($vars['period'])) { $vars['period'] = "1day"; } if (!isset($vars['period'])) { $vars['period'] = "1day"; }
$from = "-" . $vars['period']; $from = "-" . $vars['period'];
echo("<div style='margin: 0px 0px 0px 0px'> echo("<div style='margin: 0px 0px 0px 0px'>
<div style=' margin:0px; float: left;';> <div style=' margin:0px; float: left;';>
<div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'> <div style='margin: 0px 10px 5px 0px; padding:5px; background: #e5e5e5;'>
@@ -124,7 +123,6 @@ if ($vars['subview'] == "top10")
$arp_host = dbFetchRow("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = ? AND I.interface_id = A.interface_id AND D.device_id = I.device_id", array($addy['ipv4_address'])); $arp_host = dbFetchRow("SELECT * FROM ipv4_addresses AS A, ports AS I, devices AS D WHERE A.ipv4_address = ? AND I.interface_id = A.interface_id AND D.device_id = I.device_id", array($addy['ipv4_address']));
if ($arp_host) { $arp_name = generate_device_link($arp_host); $arp_name .= " ".generate_port_link($arp_host); } else { unset($arp_if); } if ($arp_host) { $arp_name = generate_device_link($arp_host); $arp_name .= " ".generate_port_link($arp_host); } else { unset($arp_if); }
if ($name == $addy['ipv4_address']) { unset ($name); } if ($name == $addy['ipv4_address']) { unset ($name); }
if (dbFetchCell("SELECT count(*) FROM bgpPeers WHERE device_id = ? AND bgpPeerIdentifier = ?", array($acc['device_id'], $addy['ipv4_address']))) if (dbFetchCell("SELECT count(*) FROM bgpPeers WHERE device_id = ? AND bgpPeerIdentifier = ?", array($acc['device_id'], $addy['ipv4_address'])))
{ {
-3
View File
@@ -6,7 +6,6 @@ if ($vars['view'] == 'graphs' || $vars['view'] == 'minigraphs')
} }
if (!$vars['view']) { $vars['view'] = "basic"; } if (!$vars['view']) { $vars['view'] = "basic"; }
$link_array = array('page' => 'device', $link_array = array('page' => 'device',
'device' => $device['device_id'], 'device' => $device['device_id'],
'tab' => 'ports'); 'tab' => 'ports');
@@ -26,7 +25,6 @@ if(dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `ifType` = 'adsl'"))
$menu_options['adsl'] = 'ADSL'; $menu_options['adsl'] = 'ADSL';
} }
$sep = ""; $sep = "";
foreach ($menu_options as $option => $text) foreach ($menu_options as $option => $text)
{ {
@@ -114,5 +112,4 @@ if ($vars['view'] == 'minigraphs')
echo("</table></div>"); echo("</table></div>");
} }
?> ?>
-3
View File
@@ -25,7 +25,6 @@ unset($sep);
print_optionbar_end(); print_optionbar_end();
echo('<div id="content"> echo('<div id="content">
<table border="0" cellspacing="0" cellpadding="5" width="100%">'); <table border="0" cellspacing="0" cellpadding="5" width="100%">');
@@ -56,7 +55,6 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
$entity_descr = $entity['entPhysicalName'] . " (" . $entity['entPhysicalModelName'] .")"; $entity_descr = $entity['entPhysicalName'] . " (" . $entity['entPhysicalModelName'] .")";
} }
echo("<tr bgcolor=$bg_colour><td>".$entity_descr."</td> echo("<tr bgcolor=$bg_colour><td>".$entity_descr."</td>
<td>".$cef['afi']."</td> <td>".$cef['afi']."</td>
<td>"); <td>");
@@ -104,7 +102,6 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
echo("</td></tr>"); echo("</td></tr>");
} }
$i++; $i++;
} }
@@ -72,19 +72,14 @@ $graph_array['type'] = $graph_type;
include("includes/print-quadgraphs.inc.php"); include("includes/print-quadgraphs.inc.php");
echo(" echo("
</td> </td>
</tr>"); </tr>");
} }
echo("</td>"); echo("</td>");
echo("</tr>"); echo("</tr>");
$i++; $i++;
} }
-3
View File
@@ -13,7 +13,6 @@ if ($vars['hardware']) { $where .= " AND hardware = ?"; $sql_param[] = $vars[
if ($vars['features']) { $where .= " AND features = ?"; $sql_param[] = $vars['features']; } if ($vars['features']) { $where .= " AND features = ?"; $sql_param[] = $vars['features']; }
if ($vars['type']) { $where .= " AND type = ?"; $sql_param[] = $vars['type']; } if ($vars['type']) { $where .= " AND type = ?"; $sql_param[] = $vars['type']; }
if ($vars['location'] == "Unset") { $location_filter = ''; } if ($vars['location'] == "Unset") { $location_filter = ''; }
if ($vars['location']) { $location_filter = $vars['location']; } if ($vars['location']) { $location_filter = $vars['location']; }
@@ -219,7 +218,6 @@ foreach ($menu_options as $option => $text)
echo('<a href="'. generate_url($vars, array('bare' => 'yes')).'">Remove Header</a>'); echo('<a href="'. generate_url($vars, array('bare' => 'yes')).'">Remove Header</a>');
} }
?> ?>
</div> </div>
@@ -288,5 +286,4 @@ if($format == "graph")
echo("</table>"); echo("</table>");
} }
?> ?>
-3
View File
@@ -1,4 +1,3 @@
<table border=0 cellpadding=10 cellspacing=10 width=100%> <table border=0 cellpadding=10 cellspacing=10 width=100%>
<tr> <tr>
<td colspan=2> <td colspan=2>
@@ -56,7 +55,6 @@ foreach ($dev_list as $device_id => $descr)
echo("</tr></table>"); echo("</tr></table>");
?> ?>
</td> </td>
@@ -82,7 +80,6 @@ while ($device = mysql_fetch_array($sql)) {
if (!$already) { $nodes[] = $device['device_id']; } if (!$already) { $nodes[] = $device['device_id']; }
} }
$sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'"); $sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'");
while ($device = mysql_fetch_array($sql)) { while ($device = mysql_fetch_array($sql)) {
if (device_permitted($device['device_id'])) { if (device_permitted($device['device_id'])) {
-2
View File
@@ -101,13 +101,11 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); } while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>"); echo("</table>");
echo("</div> echo("</div>
</td> </td>
<td bgcolor=#e5e5e5 width=275 valign=top>"); <td bgcolor=#e5e5e5 width=275 valign=top>");
/// this stuff can be customised to show whatever you want.... /// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5') if ($_SESSION['userlevel'] >= '5')
-9
View File
@@ -27,7 +27,6 @@ while ($device = mysql_fetch_assoc($sql)) {
if (!$already) { $nodes[] = $device['device_id']; } if (!$already) { $nodes[] = $device['device_id']; }
} }
$sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'"); $sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'");
while ($device = mysql_fetch_assoc($sql)) { while ($device = mysql_fetch_assoc($sql)) {
if (device_permitted($device['device_id'])) { if (device_permitted($device['device_id'])) {
@@ -93,7 +92,6 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
} }
} }
echo(" echo("
<div style='clear: both;'>$errorboxes</div> <div style='margin: 0px; clear: both;'> <div style='clear: both;'>$errorboxes</div> <div style='margin: 0px; clear: both;'>
@@ -108,13 +106,11 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); } while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>"); echo("</table>");
echo("</div> echo("</div>
</td> </td>
<td bgcolor=#e5e5e5 width=470 valign=top>"); <td bgcolor=#e5e5e5 width=470 valign=top>");
/// this stuff can be customised to show whatever you want.... /// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5') if ($_SESSION['userlevel'] >= '5')
@@ -136,13 +132,11 @@ if ($_SESSION['userlevel'] >= '5')
$seperator = ","; $seperator = ",";
} }
$ports['broadband'] = "3294,3295,688,3534"; $ports['broadband'] = "3294,3295,688,3534";
$ports['wave_broadband'] = "827"; $ports['wave_broadband'] = "827";
$ports['new_broadband'] = "3659,4149,4121,4108,3676,4135"; $ports['new_broadband'] = "3659,4149,4121,4108,3676,4135";
echo("<div style=' margin-bottom: 5px;'>"); echo("<div style=' margin-bottom: 5px;'>");
if ($ports['peering'] && $ports['transit']) { if ($ports['peering'] && $ports['transit']) {
@@ -197,8 +191,6 @@ if ($_SESSION['userlevel'] >= '5')
"&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no&amp;inverse=c'></a></div>"); "&amp;from=".$day."&amp;to=".$now."&amp;width=385&amp;height=100&amp;legend=no&amp;inverse=c'></a></div>");
} }
echo("<div style=' margin-bottom: 5px;'>"); echo("<div style=' margin-bottom: 5px;'>");
if ($ports['broadband']) { if ($ports['broadband']) {
@@ -226,7 +218,6 @@ if ($_SESSION['userlevel'] >= '5')
echo("</div>"); echo("</div>");
if ($ports['wave_broadband']) { if ($ports['wave_broadband']) {
echo("<div style='width: 235px; float: left;'> echo("<div style='width: 235px; float: left;'>
<a onmouseover=\"return overlib('\ <a onmouseover=\"return overlib('\
-5
View File
@@ -27,7 +27,6 @@ foreach (dbFetchRows("SELECT * FROM `devices` AS D, `devices_attribs` AS A WHERE
if (!$already) { $nodes[] = $device['device_id']; } if (!$already) { $nodes[] = $device['device_id']; }
} }
foreach (dbFetchRows("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'") as $device) foreach (dbFetchRows("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'") as $device)
{ {
if (device_permitted($device['device_id'])) { if (device_permitted($device['device_id'])) {
@@ -92,7 +91,6 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
} }
} }
echo(" echo("
<div style='clear: both;'>$errorboxes</div> <div style='margin: 0px; clear: both;'> <div style='clear: both;'>$errorboxes</div> <div style='margin: 0px; clear: both;'>
@@ -107,13 +105,11 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); } while ($entry = mysql_fetch_assoc($query)) { include("includes/print-syslog.inc.php"); }
echo("</table>"); echo("</table>");
echo("</div> echo("</div>
</td> </td>
<td bgcolor=#e5e5e5 width=470 valign=top>"); <td bgcolor=#e5e5e5 width=470 valign=top>");
/// this stuff can be customised to show whatever you want.... /// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5') if ($_SESSION['userlevel'] >= '5')
@@ -182,7 +178,6 @@ if ($_SESSION['userlevel'] >= '5')
"&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>"); "&amp;from=".$day."&amp;to=".$now."&amp;width=155&amp;height=100&amp;legend=no'></a></div>");
} }
if ($ports['core']) { if ($ports['core']) {
echo("<div style='width: 235px;'> echo("<div style='width: 235px;'>
<a href='iftype/core/' onmouseover=\"return overlib('\ <a href='iftype/core/' onmouseover=\"return overlib('\
-1
View File
@@ -91,7 +91,6 @@ if (!$auth)
print_optionbar_end(); print_optionbar_end();
echo generate_graph_js_state($graph_array); echo generate_graph_js_state($graph_array);
echo('<div style="width: '.$graph_array['width'].'; margin: auto;">'); echo('<div style="width: '.$graph_array['width'].'; margin: auto;">');
-1
View File
@@ -76,7 +76,6 @@ foreach (getlocations() as $location)
include("includes/print-quadgraphs.inc.php"); include("includes/print-quadgraphs.inc.php");
echo("</tr></td>"); echo("</tr></td>");
} }
$done = "yes"; $done = "yes";
-1
View File
@@ -9,7 +9,6 @@ foreach ($ports as $port)
$port['in_rate'] = formatRates($port['ifInOctets_rate'] * 8); $port['in_rate'] = formatRates($port['ifInOctets_rate'] * 8);
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8); $port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
if ($port['in_errors'] > 0 || $port['out_errors'] > 0) if ($port['in_errors'] > 0 || $port['out_errors'] > 0)
{ {
$error_img = generate_port_link($port,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>",errors); $error_img = generate_port_link($port,"<img src='images/16/chart_curve_error.png' alt='Interface Errors' border=0>",errors);
-3
View File
@@ -122,12 +122,10 @@ else
if ($vars['graph'] == "macaccounting_pkts") { echo("</span>"); } if ($vars['graph'] == "macaccounting_pkts") { echo("</span>"); }
echo(")"); echo(")");
echo('</div>'); echo('</div>');
print_optionbar_end(); print_optionbar_end();
echo("<table border=0 cellspacing=0 cellpadding=5 width=100% class='sortable'>"); echo("<table border=0 cellspacing=0 cellpadding=5 width=100% class='sortable'>");
echo('<tr style="height: 30px"><td width=1></td><th>Local address</th><th></th><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>State</th><th width=200>Uptime / Updates</th></tr>'); echo('<tr style="height: 30px"><td width=1></td><th>Local address</th><th></th><th>Peer address</th><th>Type</th><th>Family</th><th>Remote AS</th><th>State</th><th width=200>Uptime / Updates</th></tr>');
@@ -205,7 +203,6 @@ else
<img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr> <img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>
<tr height=5></tr>"); <tr height=5></tr>");
unset($invalid); unset($invalid);
switch ($vars['graph']) switch ($vars['graph'])
{ {
-1
View File
@@ -22,5 +22,4 @@
} }
} }
?> ?>
-5
View File
@@ -26,7 +26,6 @@ function getDates($dayofmonth)
$lastyear = $year; $lastyear = $year;
} }
$date_from = $year . $month . $dayofmonth; $date_from = $year . $month . $dayofmonth;
$date_to = $newyear . $newmonth . $dayofmonth; $date_to = $newyear . $newmonth . $dayofmonth;
@@ -58,7 +57,6 @@ function getDates($dayofmonth)
$lastyear = $year; $lastyear = $year;
} }
$date_from = $newyear . $newmonth . $dayofmonth; $date_from = $newyear . $newmonth . $dayofmonth;
$date_to = $year . $month . $dayofmonth; $date_to = $year . $month . $dayofmonth;
@@ -75,7 +73,6 @@ function getDates($dayofmonth)
return($return); return($return);
} }
function getValue($host, $port, $id, $inout) function getValue($host, $port, $id, $inout)
{ {
global $config; global $config;
@@ -177,7 +174,6 @@ function getRates($bill_id,$datefrom,$dateto)
$mtot = getTotal($bill_id,$datefrom,$dateto); $mtot = getTotal($bill_id,$datefrom,$dateto);
$ptot = getPeriod($bill_id,$datefrom,$dateto); $ptot = getPeriod($bill_id,$datefrom,$dateto);
$data['rate_95th_in'] = get95thIn($bill_id,$datefrom,$dateto); $data['rate_95th_in'] = get95thIn($bill_id,$datefrom,$dateto);
$data['rate_95th_out'] = get95thOut($bill_id,$datefrom,$dateto); $data['rate_95th_out'] = get95thOut($bill_id,$datefrom,$dateto);
@@ -210,5 +206,4 @@ function getPeriod($bill_id,$datefrom,$dateto)
return($ptot); return($ptot);
} }
?> ?>
-1
View File
@@ -143,7 +143,6 @@ function port_by_id_cache($port_id)
return $port; return $port;
} }
function get_port_by_id($port_id) function get_port_by_id($port_id)
{ {
if (is_numeric($port_id)) if (is_numeric($port_id))
-2
View File
@@ -31,7 +31,6 @@
* @link http://pear.php.net/package/Console_Color * @link http://pear.php.net/package/Console_Color
*/ */
$GLOBALS['_CONSOLE_COLOR_CODES'] = array ( $GLOBALS['_CONSOLE_COLOR_CODES'] = array (
'color' => array( 'color' => array(
'black' => 30, 'black' => 30,
@@ -68,7 +67,6 @@ $GLOBALS['_CONSOLE_COLOR_CODES'] = array (
) )
); );
/** /**
* A simple class to use ANSI Colorcodes. * A simple class to use ANSI Colorcodes.
* *
-1
View File
@@ -180,7 +180,6 @@ $config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
#$config['collectd_dir'] = '/var/lib/collectd/rrd'; #$config['collectd_dir'] = '/var/lib/collectd/rrd';
#$config['smokeping']['dir'] = "/var/lib/smokeping/"; #$config['smokeping']['dir'] = "/var/lib/smokeping/";
# NFSen RRD dir. # NFSen RRD dir.
$config['nfsen_enable'] = 0; $config['nfsen_enable'] = 0;
#$config['nfsen_split_char'] = "_"; #$config['nfsen_split_char'] = "_";
-1
View File
@@ -30,7 +30,6 @@ if (is_array($cefs))
{ {
echo(" | |-".$path.": ".$path_name['cefSwitchingPath']."\n"); echo(" | |-".$path.": ".$path_name['cefSwitchingPath']."\n");
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `cef` WHERE `device_id` = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity."' if (mysql_result(mysql_query("SELECT COUNT(*) FROM `cef` WHERE `device_id` = '".$device['device_id']."' AND `entPhysicalIndex` = '".$entity."'
AND `afi` = '".$afi."' AND `cef_index` = '".$path."'"),0) != "1") AND `afi` = '".$afi."' AND `cef_index` = '".$path."'"),0) != "1")
{ {
-1
View File
@@ -6,7 +6,6 @@ echo("Current: ");
$include_dir = "includes/discovery/current"; $include_dir = "includes/discovery/current";
include("includes/include-dir.inc.php"); include("includes/include-dir.inc.php");
if ($debug) { print_r($valid['sensor']['current']); } if ($debug) { print_r($valid['sensor']['current']); }
check_valid_sensors($device, 'current', $valid['sensor']); check_valid_sensors($device, 'current', $valid['sensor']);
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "gamatronicups") if ($device['os'] == "gamatronicups")
{ {
for ($i = 1; $i <= 3; $i++) for ($i = 1; $i <= 3; $i++)
@@ -1,7 +1,5 @@
<?php <?php
## IPOMANII-MIB ## IPOMANII-MIB
if ($device['os'] == "ipoman") if ($device['os'] == "ipoman")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## MGE UPS ## MGE UPS
if ($device['os'] == "mgeups") if ($device['os'] == "mgeups")
{ {
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "netvision") if ($device['os'] == "netvision")
{ {
for ($i = 1; $i <= 3; $i++) for ($i = 1; $i <= 3; $i++)
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == 'sentry3') if ($device['os'] == 'sentry3')
{ {
$divisor = "100"; $divisor = "100";
-2
View File
@@ -1,7 +1,5 @@
<?php <?php
## XUPS-MIB ## XUPS-MIB
if ($device['os'] == "powerware") if ($device['os'] == "powerware")
{ {
@@ -4,7 +4,6 @@
if ($config['enable_inventory']) { if ($config['enable_inventory']) {
echo("\nCaching OIDs:"); echo("\nCaching OIDs:");
$entity_array = array(); $entity_array = array();
@@ -1,7 +1,5 @@
<?php <?php
## Areca Fanspeeds ## Areca Fanspeeds
if ($device['os'] == "areca") if ($device['os'] == "areca")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## LMSensors Fanspeeds ## LMSensors Fanspeeds
if ($device['os'] == "linux") if ($device['os'] == "linux")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## Supermicro Fanspeeds ## Supermicro Fanspeeds
if ($device['os'] == "linux") if ($device['os'] == "linux")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## APC ## APC
if ($device['os'] == "apc") if ($device['os'] == "apc")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## IPOMANII-MIB ## IPOMANII-MIB
if ($device['os'] == "ipoman") if ($device['os'] == "ipoman")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## MGE UPS Frequencies ## MGE UPS Frequencies
if ($device['os'] == "mgeups") if ($device['os'] == "mgeups")
{ {
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "netvision") if ($device['os'] == "netvision")
{ {
$freq_oid = "1.3.6.1.4.1.4555.1.1.1.1.3.2.0"; $freq_oid = "1.3.6.1.4.1.4555.1.1.1.1.3.2.0";
@@ -1,7 +1,5 @@
<?php <?php
## XUPS ## XUPS
if ($device['os'] == "powerware") if ($device['os'] == "powerware")
{ {
-3
View File
@@ -223,7 +223,6 @@ function sensor_low_limit($class, $current)
return $limit; return $limit;
} }
function sensor_limit($class, $current) function sensor_limit($class, $current)
{ {
$limit = NULL; $limit = NULL;
@@ -348,7 +347,6 @@ function discover_storage(&$valid, $device, $index, $type, $mib, $descr, $size,
} }
} }
function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $precision = "1", $current = NULL, $entPhysicalIndex = NULL, $hrDeviceIndex = NULL) function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $precision = "1", $current = NULL, $entPhysicalIndex = NULL, $hrDeviceIndex = NULL)
{ {
global $config, $debug; global $config, $debug;
@@ -378,7 +376,6 @@ function discover_processor(&$valid, $device, $oid, $index, $type, $descr, $prec
} }
} }
function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = "1", $entPhysicalIndex = NULL, $hrDeviceIndex = NULL) function discover_mempool(&$valid, $device, $index, $type, $descr, $precision = "1", $entPhysicalIndex = NULL, $hrDeviceIndex = NULL)
{ {
global $config, $debug; global $config, $debug;
-2
View File
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms') if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
{ {
$oids = snmp_walk($device, ".1.3.6.1.4.1.3854.1.2.2.1.16.1.4", "-Osqn", ""); $oids = snmp_walk($device, ".1.3.6.1.4.1.3854.1.2.2.1.16.1.4", "-Osqn", "");
@@ -3,8 +3,6 @@
# FIXME: EMD "stack" support # FIXME: EMD "stack" support
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ? # FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
if ($device['os'] == "ipoman") if ($device['os'] == "ipoman")
{ {
echo(" IPOMANII-MIB "); echo(" IPOMANII-MIB ");
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == 'sentry3') if ($device['os'] == 'sentry3')
{ {
$oids = snmp_walk($device, "tempHumidSensorHumidValue", "-Osqn", "Sentry3-MIB"); $oids = snmp_walk($device, "tempHumidSensorHumidValue", "-Osqn", "Sentry3-MIB");
@@ -9,7 +9,6 @@ if ($device['os'] == "aos")
$used = $total / 100 * $perc_used; $used = $total / 100 * $perc_used;
$free = $total - $used; $free = $total - $used;
if (is_numeric($total) && is_numeric($used)) if (is_numeric($total) && is_numeric($used))
{ {
discover_mempool($valid_mempool, $device, 0, "aos-device", "Device Memory", "1", NULL, NULL); discover_mempool($valid_mempool, $device, 0, "aos-device", "Device Memory", "1", NULL, NULL);
@@ -39,7 +39,6 @@ if (is_array($storage_array))
if (strstr($descr, "MALLOC") || strstr($descr, "UMA")) { $deny = 1; } ## Ignore FreeBSD INSANITY if (strstr($descr, "MALLOC") || strstr($descr, "UMA")) { $deny = 1; } ## Ignore FreeBSD INSANITY
if (strstr($descr, "procfs") || strstr($descr, "/proc")) { $deny = 1; } ## Ignore ProcFS if (strstr($descr, "procfs") || strstr($descr, "/proc")) { $deny = 1; } ## Ignore ProcFS
if (!$deny && is_numeric($index)) if (!$deny && is_numeric($index))
{ {
discover_mempool($valid_mempool, $device, $index, "hrstorage", $descr, $units, NULL, NULL); discover_mempool($valid_mempool, $device, $index, "hrstorage", $descr, $units, NULL, NULL);
@@ -17,5 +17,4 @@ if (!$os)
if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.9.1") !== FALSE) { $os = "timos"; } if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.9.1") !== FALSE) { $os = "timos"; }
} }
?> ?>
-1
View File
@@ -4,7 +4,6 @@ if (!$os)
{ {
if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; } if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; }
## Specific Linux-derivatives ## Specific Linux-derivatives
if ($os == "linux") { if ($os == "linux") {
-1
View File
@@ -4,7 +4,6 @@
echo("Ports : "); echo("Ports : ");
$ports = array(); $ports = array();
$ports = snmpwalk_cache_oid($device, "ifDescr", $port_stats, "IF-MIB"); $ports = snmpwalk_cache_oid($device, "ifDescr", $port_stats, "IF-MIB");
#$ports = snmpwalk_cache_oid($device, "ifName", $port_stats, "IF-MIB"); #$ports = snmpwalk_cache_oid($device, "ifName", $port_stats, "IF-MIB");
@@ -5,7 +5,6 @@
## ##
## STATISTICS-MIB::hpSwitchCpuStat.0 = INTEGER: 10 ## STATISTICS-MIB::hpSwitchCpuStat.0 = INTEGER: 10
if ($device['os'] == "procurve") if ($device['os'] == "procurve")
{ {
echo("Procurve : "); echo("Procurve : ");
@@ -34,7 +34,6 @@ if (is_array($hrstorage_array))
break; break;
} }
foreach ($config['ignore_mount'] as $bi) { if ($bi == $descr) { $deny = 1; if ($debug) echo("$bi == $descr \n"); } } foreach ($config['ignore_mount'] as $bi) { if ($bi == $descr) { $deny = 1; if ($debug) echo("$bi == $descr \n"); } }
foreach ($config['ignore_mount_string'] as $bi) { if (strpos($descr, $bi) !== FALSE) { $deny = 1; if ($debug) echo("strpos: $descr, $bi \n"); } } foreach ($config['ignore_mount_string'] as $bi) { if (strpos($descr, $bi) !== FALSE) { $deny = 1; if ($debug) echo("strpos: $descr, $bi \n"); } }
foreach ($config['ignore_mount_regexp'] as $bi) { if (preg_match($bi, $descr) > "0") { $deny = 1; if ($debug) echo("preg_match $bi, $descr \n"); } } foreach ($config['ignore_mount_regexp'] as $bi) { if (preg_match($bi, $descr) > "0") { $deny = 1; if ($debug) echo("preg_match $bi, $descr \n"); } }
@@ -21,5 +21,4 @@ if (strstr($device['hardware'], "Dell"))
} }
} }
?> ?>
-2
View File
@@ -1,7 +1,5 @@
<?php <?php
## APC Voltages ## APC Voltages
if ($device['os'] == "apc") if ($device['os'] == "apc")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## Areca Voltages ## Areca Voltages
if ($device['os'] == "areca") if ($device['os'] == "areca")
{ {
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "gamatronicups") if ($device['os'] == "gamatronicups")
{ {
for($i = 1; $i <= 3 ;$i++) for($i = 1; $i <= 3 ;$i++)
@@ -1,7 +1,5 @@
<?php <?php
## IPOMANII-MIB ## IPOMANII-MIB
if ($device['os'] == "ipoman") if ($device['os'] == "ipoman")
{ {
@@ -1,7 +1,5 @@
<?php <?php
## MGE UPS Voltages ## MGE UPS Voltages
if ($device['os'] == "mgeups") if ($device['os'] == "mgeups")
{ {
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "netvision") if ($device['os'] == "netvision")
{ {
@@ -1,7 +1,5 @@
<?php <?php
if ($device['os'] == "sentry3") if ($device['os'] == "sentry3")
{ {
$oids = snmp_walk($device, "infeedVoltage", "-OsqnU", "Sentry3-MIB"); $oids = snmp_walk($device, "infeedVoltage", "-OsqnU", "Sentry3-MIB");
@@ -1,7 +1,5 @@
<?php <?php
## Supermicro Voltages ## Supermicro Voltages
if ($device['os'] == "linux") if ($device['os'] == "linux")
{ {
-2
View File
@@ -1,7 +1,5 @@
<?php <?php
## XUPS-MIB ## XUPS-MIB
if ($device['os'] == "powerware") if ($device['os'] == "powerware")
{ {
-2
View File
@@ -40,8 +40,6 @@ foreach ($ipsec_array as $index => $tunnel)
"cikeTunLocalName" => "tunnel_name", "cikeTunLocalName" => "tunnel_name",
"cikeTunLocalValue" => "local_addr"); "cikeTunLocalValue" => "local_addr");
if (!is_array($tunnels[$tunnel['cikeTunRemoteValue']])) if (!is_array($tunnels[$tunnel['cikeTunRemoteValue']]))
{ {
$tunnel_id = dbInsert(array('device_id' => $device['device_id'], 'peer_addr' => $tunnel['cikeTunRemoteValue'], 'local_addr' => $tunnel['cikeTunLocalValue'], 'tunnel_name' => $tunnel['cikeTunLocalName']), 'ipsec_tunnels'); $tunnel_id = dbInsert(array('device_id' => $device['device_id'], 'peer_addr' => $tunnel['cikeTunRemoteValue'], 'local_addr' => $tunnel['cikeTunLocalValue'], 'tunnel_name' => $tunnel['cikeTunLocalName']), 'ipsec_tunnels');
-1
View File
@@ -32,7 +32,6 @@ if (is_array($cefs))
{ {
echo(" | |-".$path.": ".$cef_stat['cefSwitchingPath']); echo(" | |-".$path.": ".$cef_stat['cefSwitchingPath']);
if (dbFetchCell("SELECT COUNT(*) FROM `cef_switching` WHERE `device_id` = ? AND `entPhysicalIndex` = ? AND `afi` = ? AND `cef_index` = ?", array($device['device_id'], $entity, $afi, $path)) != "1") if (dbFetchCell("SELECT COUNT(*) FROM `cef_switching` WHERE `device_id` = ? AND `entPhysicalIndex` = ? AND `afi` = ? AND `cef_index` = ?", array($device['device_id'], $entity, $afi, $path)) != "1")
{ {
dbInsert(array('device_id' => $device['device_id'], 'entPhysicalIndex' => $entity, 'afi' => $afi, 'cef_index' => $path, 'cef_path' => $cef_stat['cefSwitchingPath']), 'cef_switching'); dbInsert(array('device_id' => $device['device_id'], 'entPhysicalIndex' => $entity, 'afi' => $afi, 'cef_index' => $path, 'cef_path' => $cef_stat['cefSwitchingPath']), 'cef_switching');
-1
View File
@@ -23,5 +23,4 @@ $mempool['total'] = $entry['hwEntityMemSize'];
$mempool['used'] = $entry['hwEntityMemSize'] / 100 * $perc; $mempool['used'] = $entry['hwEntityMemSize'] / 100 * $perc;
$mempool['free'] = $entry['hwEntityMemSize'] - $mempool['used']; $mempool['free'] = $entry['hwEntityMemSize'] - $mempool['used'];
?> ?>
-3
View File
@@ -107,7 +107,6 @@ if ($debug)
echo("\n"); echo("\n");
} }
### Loop array of entries and update ### Loop array of entries and update
if (is_array($ospf_areas_db)) if (is_array($ospf_areas_db))
{ {
@@ -144,7 +143,6 @@ if (is_array($ospf_areas_db))
unset($ospf_areas_db); unset($ospf_areas_db);
unset($ospf_areas_poll); unset($ospf_areas_poll);
#$ospf_ports = snmpwalk_cache_oid($device, "OSPF-MIB::ospfIfEntry", array(), "OSPF-MIB"); #$ospf_ports = snmpwalk_cache_oid($device, "OSPF-MIB::ospfIfEntry", array(), "OSPF-MIB");
#print_r($ospf_ports); #print_r($ospf_ports);
@@ -292,7 +290,6 @@ if (is_array($ospf_nbrs_db))
} }
} }
foreach ($ospf_nbr_oids as $oid) foreach ($ospf_nbr_oids as $oid)
{ // Loop the OIDs { // Loop the OIDs
if ($debug) { echo($ospf_nbr_db[$oid]."|".$ospf_nbr_poll[$oid]."\n"); } if ($debug) { echo($ospf_nbr_db[$oid]."|".$ospf_nbr_poll[$oid]."\n"); }

Some files were not shown because too many files have changed in this diff Show More