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

View File

@@ -72,7 +72,6 @@ if (isset($options['d']))
# ini_set('error_reporting', 0);
}
if (!$where)
{
echo("-h <device id> | <device hostname wildcard> Poll single device\n");
@@ -179,7 +178,6 @@ if(!isset($options['q'])) {
echo("\n");
}
logfile($string);
?>

View File

@@ -184,7 +184,6 @@ $lineplot->SetFillColor("#d5d5d5@0.5");
#$lineplot2->SetColor("#d5d5d5");
#$lineplot2->SetFillColor("#d5d5d5@0.5");
$lineplot_in = new LinePlot($in_data, $ticks);
$lineplot_in->SetLegend("Traffic In");

View File

@@ -5,7 +5,6 @@ function generate_link($text, $vars, $new_vars = array())
return '<a href="'.generate_url($vars, $new_vars).'">'.$text.'</a>';
}
function generate_url($vars, $new_vars = array())
{
@@ -42,7 +41,6 @@ function generate_overlib_content($graph_array, $text)
}
function get_percentage_colours($percentage)
{

View File

@@ -6,7 +6,6 @@ include("includes/graphs/common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-apache-".$app['app_id'].".rrd";
$array = array('sb_reading' => array('descr' => 'Reading', 'colour' => '750F7DFF'),
'sb_writing' => array('descr' => 'Writing', 'colour' => '00FF00FF'),
'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'),
);
$i = 0;
if (is_file($rrd_filename))
{
@@ -39,5 +37,4 @@ $unit_text = "Workers";
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
?>

View File

@@ -15,7 +15,4 @@ if (is_numeric($id))
}
}
?>

View File

@@ -36,7 +36,6 @@ if($bill['bill_type'] == "cdr") {
$custom_graph .= " HRULE:" . $rates['rate_average'] * 1000 * -1 . "#cc0000";
}
include("includes/graphs/generic_multi_bits_separated.inc.php");
?>

View File

@@ -10,14 +10,12 @@ if ($_GET['legend'] == "no") { $rrd_options = " -g"; }
if ($_GET['title'] == "yes") { $rrd_options .= " --title='".$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)) { $rrd_options .= " -l $scale_min"; }
if (isset($scale_max)) { $rrd_options .= " -u $scale_max"; }
if (isset($scale_rigid)) { $rrd_options .= " -r"; }
$rrd_options .= " -E --start ".$from." --end " . $to . " --width ".$width." --height ".$height." ";
$rrd_options .= $config['rrdgraph_def_text'];

View File

@@ -108,7 +108,6 @@ function error500($title, $msg) {
return error(500, "Not found", $title, $msg);
}
/**
* 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'] . " "; }
else { $rrd_cmd .= " --font LEGEND:8:" . $config['mono_font'] . " --font AXIS:7:" . $config['mono_font'] . " "; }
if (isset($_GET['debug'])) {
header('Content-Type: text/plain; charset=utf-8');
printf("Would have executed:\n%s\n", $rrd_cmd);

View File

@@ -14,5 +14,4 @@ include("includes/graphs/device/diskio_common.inc.php");
include("includes/graphs/generic_multi_bits_separated.inc.php");
?>

View File

@@ -15,5 +15,4 @@ foreach (dbFetchRows("SELECT * FROM `ucd_diskio` AS U, `devices` AS D WHERE D.de
}
}
?>

View File

@@ -10,7 +10,6 @@ $scale_rigid = TRUE;
include("includes/graphs/common.inc.php");
include("smokeping_common.inc.php");
$i = 0;
$pings = 20;
$iter = 0;
@@ -23,7 +22,6 @@ if($width > "500")
$descr_len = 12 + round(($width - 250) / 8);
}
if($width > "500")
{
$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:avmsr$i:'%5.1lf%s\\l'";
$i++;
}

View File

@@ -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 ($multiplier)
{
$rrd_options .= " DEF:p".$out."octets=".$rrd_filename_out.":".$ds_out.":AVERAGE";

View File

@@ -74,9 +74,6 @@ foreach ($rrd_list as $rrd)
$i++; $iter++;
}
if ($custom_graph) { $rrd_options .= $custom_graph; }
$rrd_options .= $rrd_optionsb;

View File

@@ -10,7 +10,6 @@ if($width > "500")
$descr_len += round(($width - 250) / 8);
}
if ($nototal) { $descrlen += "2"; $unitlen += "2";}
$unit_text = str_pad(truncate($unit_text,$unitlen),$unitlen);

View File

@@ -67,7 +67,6 @@ foreach ($rrd_list as $i => $rrd)
$t_defname = $g_defname;
}
$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."max:MAX:%6.2lf%s".str_replace("%", "%%", $units)."";

View File

@@ -10,7 +10,6 @@ $rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = "Upstream";
$rrd_list[1]['ds'] = "AtucChanCurrTxRate";
$unit_text = "Bits/sec";
$units='';

View File

@@ -50,5 +50,3 @@ if (isset($_SESSION['authenticated']) && $_SESSION['authenticated'])
<!-- ///// end of gumax-header ///// -->

View File

@@ -26,7 +26,6 @@ $type = strtolower($device['os']);
if ($device['os'] == "ios") { formatCiscoHardware($device, true); }
$device['os_text'] = $config['os'][$device['os']]['text'];
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;">
<td width="300"><span style="font-size: 15px;">' . generate_device_link($device) . '</span></td>'

View File

@@ -247,7 +247,6 @@ if ($port_details)
}
}
unset($int_links, $int_links_v6, $int_links_v4, $int_links_phys, $br);
echo("</td></tr>");

View File

@@ -40,7 +40,6 @@ if (isset($config['enable_bgp']) && $config['enable_bgp'])
</ul>
</div>
</div>
</li>
@@ -167,7 +166,6 @@ $(document).ready(function() {
});
</script>
</div><!-- End 4 columns container -->
</li><!-- End 4 columns Item -->
@@ -207,8 +205,6 @@ if ($config['show_locations'])
}
?>
<!-- PORTS -->
<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>
</div><!-- End 4 columns container -->
</li><!-- End 4 columns Item -->
<?php
# FIXME does not check user permissions...
@@ -417,7 +411,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
');
}
## BGP Sessions
if ($_SESSION['userlevel'] >= '5' && $routing_count['bgp'])
{
@@ -437,7 +430,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
');
}
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 -->
<div class="dropdown_3columns align_right"><!-- Begin 2 columns container -->
<div class="col_3">
<h2>Observium <?php echo($config['version']); ?> </h2>
</div>
<div class="col_2">
<p>Network Management and Monitoring<br />
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>
</div>
<div class="col_1">
<h2>Settings</h2>
<ul>
@@ -502,7 +490,6 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
</ul>
</div>
<?php
$apache_version = str_replace("Apache/", "", $_SERVER['SERVER_SOFTWARE']);
$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>');
} ?>
</ul>
</div>
</div><!-- End 2 columns container -->
</li><!-- End Home Item -->

View File

@@ -8,7 +8,6 @@ if (device_permitted($entry['device_id']))
echo("<tr style=\"background-color: $bg_colour\">
<td width=0></td>");
$entry['hostname'] = shorthost($entry['hostname'], 20);
if ($_GET['page'] != "device")

View File

@@ -95,7 +95,6 @@ foreach ($_POST as $name => $value)
$vars[$name] = $value;
}
if(strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; }
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 info = $('.popup', this).css('opacity', 0);
$([trigger.get(0), info.get(0)]).mouseover(function () {
if (hideDelayTimer) clearTimeout(hideDelayTimer);
if (beingShown || shown) {
@@ -260,7 +258,6 @@ if($devel || $vars['devel'])
echo("</pre>");
}
if ($_SESSION['authenticated'])
{
## Authenticated. Print a page.

View File

@@ -155,7 +155,6 @@ print_optionbar_end();
<a href="http://www.facebook.com/pages/Observer/128354461353">Facebook</a>
</p>
<h3>Observium is a Free, Open project. Please donate to support continued development.</h3>
<div style="margin-top:10px;">

View File

@@ -210,7 +210,6 @@ if (bill_permitted($bill_id))
$bi .= "&amp;from=" . $unixfrom . "&amp;to=" . $unixto;
$bi .= "&amp;width=715&amp;height=200&amp;total=1'>";
$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;width=715&amp;height=200&amp;total=1'>";

View File

@@ -16,8 +16,6 @@ echo("
<input type=submit value=' Yes, please delete this bill! ' name='Delete'></form>
");
?>

View File

@@ -111,6 +111,4 @@ echo("</select></td></tr><tr>
</select></td>
</tr><tr></table><input type='submit' name='Submit' value=' Add '></form>");
?>

View File

@@ -57,7 +57,6 @@ if ($_GET['opta'] == "add")
<td><input type="textarea" name="bill_notes" size="32"></td>
</tr>
<tr>
<td></td><td><input type="submit" class="submit" name="Submit" value=" Add Bill "></td>
</tr>
@@ -65,7 +64,6 @@ if ($_GET['opta'] == "add")
</div>
</form>
<?php
} else {

View File

@@ -1,6 +1,4 @@
<?php
?>

View File

@@ -52,7 +52,6 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `port_descr_type` = 'cust' GRO
</tr>
");
unset($customer_name);
}

View File

@@ -278,7 +278,6 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
</li>');
}
if ($_SESSION['userlevel'] >= "7")
{
echo('<li class="' . $select['edit'] . '" style="float: right;">

View File

@@ -108,5 +108,4 @@ print_optionbar_end();
}
?>

View File

@@ -16,7 +16,6 @@ if ($_SESSION['userlevel'] < '7')
$panes['alerts'] = 'Alerts';
$panes['modules'] = 'Modules';
if ($config['enable_services'])
{
$panes['services'] = 'Services';

View File

@@ -52,7 +52,6 @@ $descr = $device['purpose'];
$override_sysLocation_bool = get_dev_attrib($device,'override_sysLocation_bool');
$override_sysLocation_string = get_dev_attrib($device,'override_sysLocation_string');
if ($updated && $update_message)
{
print_message($update_message);

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('</td><td>');
echo('<form id="toggle_poller" name="toggle_poller" method="post" action="">
@@ -61,7 +60,6 @@ foreach ($config['poller_modules'] as $module => $module_status)
</label>
</form>');
echo('</td></tr>');
$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('</td><td>');
echo('<form id="toggle_discovery" name="toggle_discovery" method="post" action="">
@@ -98,14 +95,11 @@ foreach ($config['discovery_modules'] as $module => $module_status)
</label>
</form>');
echo('</td></tr>');
$i++;
}
echo('</table>');
echo('</div>');
?>

View File

@@ -1,4 +1,3 @@
<?php
?>

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['to'] = $config['time']['now'];
echo("<tr bgcolor='$row_colour'><th>");
echo(overlib_link($fs_url, $drive['diskio_descr'], generate_graph_tag($graph_array_zoom), NULL));
echo("</th></tr>");

View File

@@ -29,7 +29,6 @@ unset($sep);
print_optionbar_end();
if($vars['view'] == "incoming")
{

View File

@@ -13,5 +13,4 @@ foreach ($datas as $name=>$type)
include("includes/print-device-graph.php");
}
?>

View File

@@ -58,7 +58,6 @@ if ($services['total'])
echo("</div>");
}
### 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']));
if (count($syslog))

View File

@@ -77,7 +77,6 @@ foreach ($menu_options as $option => $text)
}
unset($sep);
if (dbFetchCell("SELECT count(*) FROM mac_accounting WHERE interface_id = '".$port['interface_id']."'") > "0" )
{

View File

@@ -29,7 +29,6 @@ if ($vars['subview'] == "top10")
if (!isset($vars['period'])) { $vars['period'] = "1day"; }
$from = "-" . $vars['period'];
echo("<div style='margin: 0px 0px 0px 0px'>
<div style=' margin:0px; float: left;';>
<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']));
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 (dbFetchCell("SELECT count(*) FROM bgpPeers WHERE device_id = ? AND bgpPeerIdentifier = ?", array($acc['device_id'], $addy['ipv4_address'])))
{

View File

@@ -6,7 +6,6 @@ if ($vars['view'] == 'graphs' || $vars['view'] == 'minigraphs')
}
if (!$vars['view']) { $vars['view'] = "basic"; }
$link_array = array('page' => 'device',
'device' => $device['device_id'],
'tab' => 'ports');
@@ -26,7 +25,6 @@ if(dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE `ifType` = 'adsl'"))
$menu_options['adsl'] = 'ADSL';
}
$sep = "";
foreach ($menu_options as $option => $text)
{
@@ -114,5 +112,4 @@ if ($vars['view'] == 'minigraphs')
echo("</table></div>");
}
?>

View File

@@ -25,7 +25,6 @@ unset($sep);
print_optionbar_end();
echo('<div id="content">
<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'] .")";
}
echo("<tr bgcolor=$bg_colour><td>".$entity_descr."</td>
<td>".$cef['afi']."</td>
<td>");
@@ -104,7 +102,6 @@ foreach (dbFetchRows("SELECT * FROM `cef_switching` WHERE `device_id` = ? ORDER
echo("</td></tr>");
}
$i++;
}

View File

@@ -72,19 +72,14 @@ $graph_array['type'] = $graph_type;
include("includes/print-quadgraphs.inc.php");
echo("
</td>
</tr>");
}
echo("</td>");
echo("</tr>");
$i++;
}

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['type']) { $where .= " AND type = ?"; $sql_param[] = $vars['type']; }
if ($vars['location'] == "Unset") { $location_filter = ''; }
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>');
}
?>
</div>
@@ -288,5 +286,4 @@ if($format == "graph")
echo("</table>");
}
?>

View File

@@ -1,4 +1,3 @@
<table border=0 cellpadding=10 cellspacing=10 width=100%>
<tr>
<td colspan=2>
@@ -56,7 +55,6 @@ foreach ($dev_list as $device_id => $descr)
echo("</tr></table>");
?>
</td>
@@ -82,7 +80,6 @@ while ($device = mysql_fetch_array($sql)) {
if (!$already) { $nodes[] = $device['device_id']; }
}
$sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'");
while ($device = mysql_fetch_array($sql)) {
if (device_permitted($device['device_id'])) {

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"); }
echo("</table>");
echo("</div>
</td>
<td bgcolor=#e5e5e5 width=275 valign=top>");
/// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5')

View File

@@ -27,7 +27,6 @@ while ($device = mysql_fetch_assoc($sql)) {
if (!$already) { $nodes[] = $device['device_id']; }
}
$sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'");
while ($device = mysql_fetch_assoc($sql)) {
if (device_permitted($device['device_id'])) {
@@ -93,7 +92,6 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
}
}
echo("
<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"); }
echo("</table>");
echo("</div>
</td>
<td bgcolor=#e5e5e5 width=470 valign=top>");
/// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5')
@@ -136,13 +132,11 @@ if ($_SESSION['userlevel'] >= '5')
$seperator = ",";
}
$ports['broadband'] = "3294,3295,688,3534";
$ports['wave_broadband'] = "827";
$ports['new_broadband'] = "3659,4149,4121,4108,3676,4135";
echo("<div style=' margin-bottom: 5px;'>");
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>");
}
echo("<div style=' margin-bottom: 5px;'>");
if ($ports['broadband']) {
@@ -226,7 +218,6 @@ if ($_SESSION['userlevel'] >= '5')
echo("</div>");
if ($ports['wave_broadband']) {
echo("<div style='width: 235px; float: left;'>
<a onmouseover=\"return overlib('\

View File

@@ -27,7 +27,6 @@ foreach (dbFetchRows("SELECT * FROM `devices` AS D, `devices_attribs` AS A WHERE
if (!$already) { $nodes[] = $device['device_id']; }
}
foreach (dbFetchRows("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'") as $device)
{
if (device_permitted($device['device_id'])) {
@@ -92,7 +91,6 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
}
}
echo("
<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"); }
echo("</table>");
echo("</div>
</td>
<td bgcolor=#e5e5e5 width=470 valign=top>");
/// this stuff can be customised to show whatever you want....
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>");
}
if ($ports['core']) {
echo("<div style='width: 235px;'>
<a href='iftype/core/' onmouseover=\"return overlib('\

View File

@@ -91,7 +91,6 @@ if (!$auth)
print_optionbar_end();
echo generate_graph_js_state($graph_array);
echo('<div style="width: '.$graph_array['width'].'; margin: auto;">');

View File

@@ -76,7 +76,6 @@ foreach (getlocations() as $location)
include("includes/print-quadgraphs.inc.php");
echo("</tr></td>");
}
$done = "yes";

View File

@@ -9,7 +9,6 @@ foreach ($ports as $port)
$port['in_rate'] = formatRates($port['ifInOctets_rate'] * 8);
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
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);

View File

@@ -122,12 +122,10 @@ else
if ($vars['graph'] == "macaccounting_pkts") { echo("</span>"); }
echo(")");
echo('</div>');
print_optionbar_end();
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>');
@@ -205,7 +203,6 @@ else
<img src='images/16/arrow_up.png' align=absmiddle /> " . format_si($peer['bgpPeerOutUpdates']) . "</td></tr>
<tr height=5></tr>");
unset($invalid);
switch ($vars['graph'])
{

View File

@@ -22,5 +22,4 @@
}
}
?>

View File

@@ -26,7 +26,6 @@ function getDates($dayofmonth)
$lastyear = $year;
}
$date_from = $year . $month . $dayofmonth;
$date_to = $newyear . $newmonth . $dayofmonth;
@@ -58,7 +57,6 @@ function getDates($dayofmonth)
$lastyear = $year;
}
$date_from = $newyear . $newmonth . $dayofmonth;
$date_to = $year . $month . $dayofmonth;
@@ -75,7 +73,6 @@ function getDates($dayofmonth)
return($return);
}
function getValue($host, $port, $id, $inout)
{
global $config;
@@ -177,7 +174,6 @@ function getRates($bill_id,$datefrom,$dateto)
$mtot = getTotal($bill_id,$datefrom,$dateto);
$ptot = getPeriod($bill_id,$datefrom,$dateto);
$data['rate_95th_in'] = get95thIn($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);
}
?>

View File

@@ -143,7 +143,6 @@ function port_by_id_cache($port_id)
return $port;
}
function get_port_by_id($port_id)
{
if (is_numeric($port_id))

View File

@@ -31,7 +31,6 @@
* @link http://pear.php.net/package/Console_Color
*/
$GLOBALS['_CONSOLE_COLOR_CODES'] = array (
'color' => array(
'black' => 30,
@@ -68,7 +67,6 @@ $GLOBALS['_CONSOLE_COLOR_CODES'] = array (
)
);
/**
* A simple class to use ANSI Colorcodes.
*

View File

@@ -180,7 +180,6 @@ $config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
#$config['collectd_dir'] = '/var/lib/collectd/rrd';
#$config['smokeping']['dir'] = "/var/lib/smokeping/";
# NFSen RRD dir.
$config['nfsen_enable'] = 0;
#$config['nfsen_split_char'] = "_";

View File

@@ -30,7 +30,6 @@ if (is_array($cefs))
{
echo(" | |-".$path.": ".$path_name['cefSwitchingPath']."\n");
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")
{

View File

@@ -6,7 +6,6 @@ echo("Current: ");
$include_dir = "includes/discovery/current";
include("includes/include-dir.inc.php");
if ($debug) { print_r($valid['sensor']['current']); }
check_valid_sensors($device, 'current', $valid['sensor']);

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "gamatronicups")
{
for ($i = 1; $i <= 3; $i++)

View File

@@ -1,7 +1,5 @@
<?php
## IPOMANII-MIB
if ($device['os'] == "ipoman")
{

View File

@@ -1,7 +1,5 @@
<?php
## MGE UPS
if ($device['os'] == "mgeups")
{

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "netvision")
{
for ($i = 1; $i <= 3; $i++)

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == 'sentry3')
{
$divisor = "100";

View File

@@ -1,7 +1,5 @@
<?php
## XUPS-MIB
if ($device['os'] == "powerware")
{

View File

@@ -4,7 +4,6 @@
if ($config['enable_inventory']) {
echo("\nCaching OIDs:");
$entity_array = array();

View File

@@ -1,7 +1,5 @@
<?php
## Areca Fanspeeds
if ($device['os'] == "areca")
{

View File

@@ -1,7 +1,5 @@
<?php
## LMSensors Fanspeeds
if ($device['os'] == "linux")
{

View File

@@ -1,7 +1,5 @@
<?php
## Supermicro Fanspeeds
if ($device['os'] == "linux")
{

View File

@@ -1,7 +1,5 @@
<?php
## APC
if ($device['os'] == "apc")
{

View File

@@ -1,7 +1,5 @@
<?php
## IPOMANII-MIB
if ($device['os'] == "ipoman")
{

View File

@@ -1,7 +1,5 @@
<?php
## MGE UPS Frequencies
if ($device['os'] == "mgeups")
{

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "netvision")
{
$freq_oid = "1.3.6.1.4.1.4555.1.1.1.1.3.2.0";

View File

@@ -1,7 +1,5 @@
<?php
## XUPS
if ($device['os'] == "powerware")
{

View File

@@ -223,7 +223,6 @@ function sensor_low_limit($class, $current)
return $limit;
}
function sensor_limit($class, $current)
{
$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)
{
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)
{
global $config, $debug;

View File

@@ -1,7 +1,5 @@
<?php
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", "");

View File

@@ -3,8 +3,6 @@
# FIXME: EMD "stack" support
# FIXME: What to do with IPOMANII-MIB::ipmEnvEmdConfigHumiOffset.0 ?
if ($device['os'] == "ipoman")
{
echo(" IPOMANII-MIB ");

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == 'sentry3')
{
$oids = snmp_walk($device, "tempHumidSensorHumidValue", "-Osqn", "Sentry3-MIB");

View File

@@ -9,7 +9,6 @@ if ($device['os'] == "aos")
$used = $total / 100 * $perc_used;
$free = $total - $used;
if (is_numeric($total) && is_numeric($used))
{
discover_mempool($valid_mempool, $device, 0, "aos-device", "Device Memory", "1", NULL, NULL);

View File

@@ -39,7 +39,6 @@ if (is_array($storage_array))
if (strstr($descr, "MALLOC") || strstr($descr, "UMA")) { $deny = 1; } ## Ignore FreeBSD INSANITY
if (strstr($descr, "procfs") || strstr($descr, "/proc")) { $deny = 1; } ## Ignore ProcFS
if (!$deny && is_numeric($index))
{
discover_mempool($valid_mempool, $device, $index, "hrstorage", $descr, $units, NULL, NULL);

View File

@@ -17,5 +17,4 @@ if (!$os)
if (strpos($sysObjectId, ".1.3.6.1.4.1.6527.1.9.1") !== FALSE) { $os = "timos"; }
}
?>

View File

@@ -4,7 +4,6 @@ if (!$os)
{
if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; }
## Specific Linux-derivatives
if ($os == "linux") {

View File

@@ -4,7 +4,6 @@
echo("Ports : ");
$ports = array();
$ports = snmpwalk_cache_oid($device, "ifDescr", $port_stats, "IF-MIB");
#$ports = snmpwalk_cache_oid($device, "ifName", $port_stats, "IF-MIB");

View File

@@ -5,7 +5,6 @@
##
## STATISTICS-MIB::hpSwitchCpuStat.0 = INTEGER: 10
if ($device['os'] == "procurve")
{
echo("Procurve : ");

View File

@@ -34,7 +34,6 @@ if (is_array($hrstorage_array))
break;
}
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_regexp'] as $bi) { if (preg_match($bi, $descr) > "0") { $deny = 1; if ($debug) echo("preg_match $bi, $descr \n"); } }

View File

@@ -21,5 +21,4 @@ if (strstr($device['hardware'], "Dell"))
}
}
?>

View File

@@ -1,7 +1,5 @@
<?php
## APC Voltages
if ($device['os'] == "apc")
{

View File

@@ -1,7 +1,5 @@
<?php
## Areca Voltages
if ($device['os'] == "areca")
{

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "gamatronicups")
{
for($i = 1; $i <= 3 ;$i++)

View File

@@ -1,7 +1,5 @@
<?php
## IPOMANII-MIB
if ($device['os'] == "ipoman")
{

View File

@@ -1,7 +1,5 @@
<?php
## MGE UPS Voltages
if ($device['os'] == "mgeups")
{

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "netvision")
{

View File

@@ -1,7 +1,5 @@
<?php
if ($device['os'] == "sentry3")
{
$oids = snmp_walk($device, "infeedVoltage", "-OsqnU", "Sentry3-MIB");

View File

@@ -1,7 +1,5 @@
<?php
## Supermicro Voltages
if ($device['os'] == "linux")
{

View File

@@ -1,7 +1,5 @@
<?php
## XUPS-MIB
if ($device['os'] == "powerware")
{

View File

@@ -40,8 +40,6 @@ foreach ($ipsec_array as $index => $tunnel)
"cikeTunLocalName" => "tunnel_name",
"cikeTunLocalValue" => "local_addr");
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');

View File

@@ -32,7 +32,6 @@ if (is_array($cefs))
{
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")
{
dbInsert(array('device_id' => $device['device_id'], 'entPhysicalIndex' => $entity, 'afi' => $afi, 'cef_index' => $path, 'cef_path' => $cef_stat['cefSwitchingPath']), 'cef_switching');

View File

@@ -23,5 +23,4 @@ $mempool['total'] = $entry['hwEntityMemSize'];
$mempool['used'] = $entry['hwEntityMemSize'] / 100 * $perc;
$mempool['free'] = $entry['hwEntityMemSize'] - $mempool['used'];
?>

View File

@@ -107,7 +107,6 @@ if ($debug)
echo("\n");
}
### Loop array of entries and update
if (is_array($ospf_areas_db))
{
@@ -144,7 +143,6 @@ if (is_array($ospf_areas_db))
unset($ospf_areas_db);
unset($ospf_areas_poll);
#$ospf_ports = snmpwalk_cache_oid($device, "OSPF-MIB::ospfIfEntry", array(), "OSPF-MIB");
#print_r($ospf_ports);
@@ -292,7 +290,6 @@ if (is_array($ospf_nbrs_db))
}
}
foreach ($ospf_nbr_oids as $oid)
{ // Loop the OIDs
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