diff --git a/attic/purgeports.inc.php b/attic/purgeports.inc.php
index a7c5b414a..170a1c46e 100644
--- a/attic/purgeports.inc.php
+++ b/attic/purgeports.inc.php
@@ -1,6 +1,6 @@
= "5" || $auth)
{
diff --git a/html/includes/graphs/customer/bits.inc.php b/html/includes/graphs/customer/bits.inc.php
index 7d958510a..5e12b5e1d 100644
--- a/html/includes/graphs/customer/bits.inc.php
+++ b/html/includes/graphs/customer/bits.inc.php
@@ -1,6 +1,6 @@
Human translation:>
+/// Dear Tobias. You write in Perl, this makes me hate you forever.
+/// This is my translation of Smokeping's graphing.
+/// Thanks to Bill Fenner for Perl->Human translation:>
$scale_min = 0;
$scale_rigid = TRUE;
diff --git a/html/includes/graphs/device/smokeping_all_common_avg.inc.php b/html/includes/graphs/device/smokeping_all_common_avg.inc.php
index 501b1c396..857891f1d 100644
--- a/html/includes/graphs/device/smokeping_all_common_avg.inc.php
+++ b/html/includes/graphs/device/smokeping_all_common_avg.inc.php
@@ -1,8 +1,8 @@
Human translation:>
+/// Dear Tobias. You write in Perl, this makes me hate you forever.
+/// This is my translation of Smokeping's graphing.
+/// Thanks to Bill Fenner for Perl->Human translation:>
$scale_min = 0;
$scale_rigid = TRUE;
@@ -22,7 +22,7 @@ if($width > "500")
$descr_len = 12 + round(($width - 275) / 8);
}
-# FIXME str_pad really needs a "limit to length" so we can rid of all the substrs all over the code to limit the length as below...
+/// FIXME str_pad really needs a "limit to length" so we can rid of all the substrs all over the code to limit the length as below...
if($width > "500")
{
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev\l'";
diff --git a/html/includes/graphs/device/storage.inc.php b/html/includes/graphs/device/storage.inc.php
index f3c1d1ac5..35c09085b 100644
--- a/html/includes/graphs/device/storage.inc.php
+++ b/html/includes/graphs/device/storage.inc.php
@@ -10,7 +10,7 @@ $rrd_options .= " COMMENT:' Size Used %age\\l'";
foreach (dbFetchRows("SELECT * FROM storage where device_id = ?", array($device['device_id'])) as $storage)
{
- # FIXME generic colour function
+ /// FIXME generic colour function
if ($iter=="1") { $colour="CC0000"; } elseif ($iter=="2") { $colour="008C00"; } elseif ($iter=="3") { $colour="4096EE"; }
elseif ($iter=="4") { $colour="73880A"; } elseif ($iter=="5") { $colour="D01F3C"; } elseif ($iter=="6") { $colour="36393D"; }
elseif ($iter=="7") { $colour="FF0084"; $iter = "0"; }
diff --git a/html/includes/graphs/device/toner.inc.php b/html/includes/graphs/device/toner.inc.php
index be6736e8e..5913999e1 100644
--- a/html/includes/graphs/device/toner.inc.php
+++ b/html/includes/graphs/device/toner.inc.php
@@ -12,7 +12,7 @@ foreach (dbFetchRows("SELECT * FROM toner where device_id = ?", array($device['d
if ($colour['left'] == NULL)
{
- # FIXME generic colour function
+ /// FIXME generic colour function
switch ($iter)
{
case "1":
diff --git a/html/includes/graphs/generic_multi_bits_separated.inc.php b/html/includes/graphs/generic_multi_bits_separated.inc.php
index 6d6145f1f..9fd35ac5c 100644
--- a/html/includes/graphs/generic_multi_bits_separated.inc.php
+++ b/html/includes/graphs/generic_multi_bits_separated.inc.php
@@ -39,7 +39,7 @@ foreach ($rrd_list as $rrd)
$descr = rrdtool_escape($rrd['descr'], $descr_len) . " In";
}
$descr_out = rrdtool_escape($rrd['descr_out'], $descr_len) . " Out";
- $descr = str_replace("'", "", $descr); # FIXME does this mean ' should be filtered in rrdtool_escape? probably...
+ $descr = str_replace("'", "", $descr); /// FIXME does this mean ' should be filtered in rrdtool_escape? probably...
$descr_out = str_replace("'", "", $descr_out);
$rrd_options .= " DEF:".$in.$i."=".$rrd['filename'].":".$ds_in.":AVERAGE ";
diff --git a/html/includes/graphs/generic_multi_data_separated.inc.php b/html/includes/graphs/generic_multi_data_separated.inc.php
index cbc1bbd33..4ed079289 100644
--- a/html/includes/graphs/generic_multi_data_separated.inc.php
+++ b/html/includes/graphs/generic_multi_data_separated.inc.php
@@ -39,7 +39,7 @@ foreach ($rrd_list as $rrd)
$descr = rrdtool_escape($rrd['descr'], $descr_len) . " In";
}
$descr_out = rrdtool_escape($rrd['descr_out'], $descr_len) . " Out";
- $descr = str_replace("'", "", $descr); # FIXME does this mean ' should be filtered in rrdtool_escape? probably...
+ $descr = str_replace("'", "", $descr); /// FIXME does this mean ' should be filtered in rrdtool_escape? probably...
$descr_out = str_replace("'", "", $descr_out);
$rrd_options .= " DEF:".$in.$i."=".$rrd['filename'].":".$ds_in.":AVERAGE ";
diff --git a/html/includes/graphs/generic_multi_seperated.inc.php b/html/includes/graphs/generic_multi_seperated.inc.php
index 670a736e9..72ecfeedb 100644
--- a/html/includes/graphs/generic_multi_seperated.inc.php
+++ b/html/includes/graphs/generic_multi_seperated.inc.php
@@ -7,7 +7,7 @@ $units_descr = substr(str_pad($units_descr, 18),0,18);
if($format == "octets" || $format == "bytes")
{
$units = "Bps";
- $format = "bits"; # FIXME bits? or bytes?
+ $format = "bits"; /// FIXME bits? or bytes?
} else {
$units = "bps";
$format = "bits";
diff --git a/html/includes/graphs/generic_multi_simplex_seperated.inc.php b/html/includes/graphs/generic_multi_simplex_seperated.inc.php
index da5fd92da..451ed6895 100644
--- a/html/includes/graphs/generic_multi_simplex_seperated.inc.php
+++ b/html/includes/graphs/generic_multi_simplex_seperated.inc.php
@@ -4,7 +4,7 @@ include("includes/graphs/common.inc.php");
if($width > "500")
{
- $descr_len = 24; # FIXME may even be more imo?
+ $descr_len = 24; /// FIXME may even be more imo?
} else {
$descr_len = 12;
$descr_len += round(($width - 250) / 8);
@@ -62,13 +62,13 @@ foreach ($rrd_list as $i => $rrd)
$plusX = ",+";
}
- ## Suppress totalling?
+ /// Suppress totalling?
if (!$nototal)
{
$rrd_options .= " VDEF:tot".$rrd['ds'].$i."=".$rrd['ds'].$i.",TOTAL";
}
- ## This this not the first entry?
+ /// This this not the first entry?
if ($i) { $stack="STACK"; }
# if we've been passed a multiplier we must make a CDEF based on it!
$g_defname = $rrd['ds'];
@@ -79,7 +79,7 @@ foreach ($rrd_list as $i => $rrd)
$rrd_options .= " CDEF:" . $g_defname . $i . "min=" . $rrd['ds'] . $i . "min," . $multiplier . ",*";
$rrd_options .= " CDEF:" . $g_defname . $i . "max=" . $rrd['ds'] . $i . "max," . $multiplier . ",*";
- ## If we've been passed a divider (divisor!) we make a CDEF for it.
+ /// If we've been passed a divider (divisor!) we make a CDEF for it.
} elseif (is_numeric($divider))
{
$g_defname = $rrd['ds'] . "_cdef";
@@ -88,7 +88,7 @@ foreach ($rrd_list as $i => $rrd)
$rrd_options .= " CDEF:" . $g_defname . $i . "max=" . $rrd['ds'] . $i . "max," . $divider . ",/";
}
- ## Are our text values related to te multiplier/divisor or not?
+ /// Are our text values related to te multiplier/divisor or not?
if (isset($text_orig) && $text_orig)
{
$t_defname = $rrd['ds'];
diff --git a/html/includes/graphs/global/bits.inc.php b/html/includes/graphs/global/bits.inc.php
index 29af53f8d..39409f617 100644
--- a/html/includes/graphs/global/bits.inc.php
+++ b/html/includes/graphs/global/bits.inc.php
@@ -1,6 +1,6 @@
0)
diff --git a/html/includes/graphs/location/bits.inc.php b/html/includes/graphs/location/bits.inc.php
index 07f1f2b85..9f75881f3 100644
--- a/html/includes/graphs/location/bits.inc.php
+++ b/html/includes/graphs/location/bits.inc.php
@@ -1,6 +1,6 @@
Human translation:>
+/// Dear Tobias. You write in Perl, this makes me hate you forever.
+/// This is my translation of Smokeping's graphing.
+/// Thanks to Bill Fenner for Perl->Human translation:>
$scale_min = 0;
$scale_rigid = TRUE;
diff --git a/html/includes/graphs/smokeping/out.inc.php b/html/includes/graphs/smokeping/out.inc.php
index 2e0bc51bc..eff92550c 100644
--- a/html/includes/graphs/smokeping/out.inc.php
+++ b/html/includes/graphs/smokeping/out.inc.php
@@ -2,9 +2,9 @@
$dest = device_by_id_cache($_GET['dest']);
-## Dear Tobias. You write in Perl, this makes me hate you forever.
-## This is my translation of Smokeping's graphing.
-## Thanks to Bill Fenner for Perl->Human translation:>
+/// Dear Tobias. You write in Perl, this makes me hate you forever.
+/// This is my translation of Smokeping's graphing.
+/// Thanks to Bill Fenner for Perl->Human translation:>
$scale_min = 0;
$scale_rigid = TRUE;
diff --git a/html/includes/print-device-graph.php b/html/includes/print-device-graph.php
index 7d069ee4f..c7c8b7b36 100644
--- a/html/includes/print-device-graph.php
+++ b/html/includes/print-device-graph.php
@@ -3,7 +3,7 @@
if(empty($graph_array['type'])) { $graph_array['type'] = $graph_type; }
if(empty($graph_array['device'])) { $graph_array['device'] = $device['device_id']; }
-# FIXME not css alternating yet
+/// FIXME not css alternating yet
if (!is_integer($g_i/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; }
echo('
');
diff --git a/html/includes/print-interface.inc.php b/html/includes/print-interface.inc.php
index b3ff988f2..eccdb6a1c 100644
--- a/html/includes/print-interface.inc.php
+++ b/html/includes/print-interface.inc.php
@@ -144,7 +144,7 @@ if (strpos($port['label'], "oopback") === false && !$graph_type)
unset($br);
if ($port_details)
- { ## Show which other devices are on the same subnet as this interface
+ { /// Show which other devices are on the same subnet as this interface
foreach (dbFetchRows("SELECT `ipv4_network_id` FROM `ipv4_addresses` WHERE `port_id` = ? AND `ipv4_address` NOT LIKE '127.%'", array($port['port_id'])) as $net)
{
$ipv4_network_id = $net['ipv4_network_id'];
diff --git a/html/includes/print-menubar.php b/html/includes/print-menubar.php
index 45bf50557..f6f78d680 100644
--- a/html/includes/print-menubar.php
+++ b/html/includes/print-menubar.php
@@ -1,6 +1,6 @@
= '5' && ($routing_count['bgp']+$routing_count['ospf
$separator++;
}
- ## BGP Sessions
+ /// BGP Sessions
if ($_SESSION['userlevel'] >= '5' && $routing_count['bgp'])
{
if ($separator)
@@ -474,7 +474,7 @@ if ($_SESSION['userlevel'] >= '5' && ($routing_count['bgp']+$routing_count['ospf
BGP Internal');
}
- ## Do Alerts at the bottom
+ /// Do Alerts at the bottom
if ($bgp_alerts)
{
echo('
@@ -511,7 +511,7 @@ if ($packages)
");
@@ -240,7 +240,7 @@ if ($devel || $vars['devel'])
if ($_SESSION['authenticated'])
{
- ## Authenticated. Print a page.
+ /// Authenticated. Print a page.
if (isset($vars['page']) && !strstr("..", $vars['page']) && is_file("pages/" . $vars['page'] . ".inc.php"))
{
include("pages/" . $vars['page'] . ".inc.php");
@@ -254,7 +254,7 @@ if ($_SESSION['authenticated'])
}
} else {
- ## Not Authenticated. Print login.
+ /// Not Authenticated. Print login.
include("pages/logon.inc.php");
exit;
diff --git a/html/map.php b/html/map.php
index ab0efab15..8ff6c78cc 100755
--- a/html/map.php
+++ b/html/map.php
@@ -47,7 +47,7 @@ if (is_array($config['branding']))
if (isset($_GET['device'])) { $where = "WHERE device_id = ".mres($_GET['device']); } else { $where = ""; }
-## FIXME this shit probably needs tidied up.
+/// FIXME this shit probably needs tidied up.
if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
{
@@ -197,7 +197,7 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
$_GET['format'] = 'png:gd';
}
- if ($links > 30) ### Unflatten if there are more than 10 links. beyond that it gets messy
+ if ($links > 30) /// Unflatten if there are more than 10 links. beyond that it gets messy
{
# $maptool = $config['unflatten'] . ' -f -l 5 | ' . $config['sfdp'] . ' -Gpack -Gcharset=latin1 | '.$config['dot'];
$maptool = $config['neato'];
@@ -239,7 +239,7 @@ if (isset($_GET['format']) && preg_match("/^[a-z]*$/", $_GET['format']))
}
else
{
- if ($_SESSION['authenticated']) ## FIXME level 10 only?
+ if ($_SESSION['authenticated']) /// FIXME level 10 only?
{
echo('
diff --git a/html/pages/adduser.inc.php b/html/pages/adduser.inc.php
index 83e46f2af..31f292b8f 100644
--- a/html/pages/adduser.inc.php
+++ b/html/pages/adduser.inc.php
@@ -27,7 +27,7 @@ else
$_POST['can_modify_passwd'] = 0;
}
- # FIXME: missing email field here on the form
+ /// FIXME: missing email field here on the form
if (adduser($_POST['new_username'], $_POST['new_password'], $_POST['new_level'], '', $_POST['realname'], $_POST['can_modify_passwd']))
{
echo("User " . $_POST['username'] . " added! ");
diff --git a/html/pages/bill.inc.php b/html/pages/bill.inc.php
index de39d3422..f116755f0 100644
--- a/html/pages/bill.inc.php
+++ b/html/pages/bill.inc.php
@@ -140,7 +140,7 @@ if (bill_permitted($bill_id))
echo("Billed Ports ");
- ### Collected Earlier
+ /// Collected Earlier
foreach ($ports as $port)
{
echo(generate_port_link($port) . " on " . generate_device_link($port) . " ");
diff --git a/html/pages/bill/actions.inc.php b/html/pages/bill/actions.inc.php
index 00bd547e2..0ba4d8f6e 100644
--- a/html/pages/bill/actions.inc.php
+++ b/html/pages/bill/actions.inc.php
@@ -31,7 +31,7 @@ if ($_POST['action'] == "reset_bill" && ($_POST['confirm'] == "rrd" || $_POST['c
dbDelete('bill_data', '`bill_id` = ?', array($bill_id));
}
if ($_POST['confirm'] == "rrd") {
- ### Stil todo
+ /// Stil todo
}
echo("Bill Reseting. Redirecting to Bills list.
");
diff --git a/html/pages/bill/edit.inc.php b/html/pages/bill/edit.inc.php
index bd3ded416..3a8f6d99e 100644
--- a/html/pages/bill/edit.inc.php
+++ b/html/pages/bill/edit.inc.php
@@ -2,9 +2,9 @@
include("includes/javascript-interfacepicker.inc.php");
-### This needs more verification. Is it already added? Does it exist?
+/// This needs more verification. Is it already added? Does it exist?
-### Calculation to extract MB/GB/TB of Kbps/Mbps/Gbps
+/// Calculation to extract MB/GB/TB of Kbps/Mbps/Gbps
$base = $config["billing"]["base"];
diff --git a/html/pages/bill/history.inc.php b/html/pages/bill/history.inc.php
index 5880d3a70..c3c82180a 100644
--- a/html/pages/bill/history.inc.php
+++ b/html/pages/bill/history.inc.php
@@ -125,7 +125,7 @@
}
$i++;
- } ### PERMITTED
+ } /// PERMITTED
}
echo("");
diff --git a/html/pages/bills.inc.php b/html/pages/bills.inc.php
index d7029c7f5..bf5d9f686 100644
--- a/html/pages/bills.inc.php
+++ b/html/pages/bills.inc.php
@@ -258,7 +258,7 @@ for ($x=1;$x<32;$x++) {
");
$i++;
- } ### PERMITTED
+ } /// PERMITTED
}
echo("");
}
diff --git a/html/pages/bills/pmonth.inc.php b/html/pages/bills/pmonth.inc.php
index c919aadd0..573f392cc 100644
--- a/html/pages/bills/pmonth.inc.php
+++ b/html/pages/bills/pmonth.inc.php
@@ -69,7 +69,7 @@
");
$i++;
- } ### PERMITTED
+ } /// PERMITTED
}
}
echo("");
diff --git a/html/pages/deluser.inc.php b/html/pages/deluser.inc.php
index d2bf1f8db..351691b19 100644
--- a/html/pages/deluser.inc.php
+++ b/html/pages/deluser.inc.php
@@ -31,7 +31,7 @@ if ($_SESSION['userlevel'] < '10') { include("includes/error-no-perm.inc.php");
}
}
- # FIXME v mysql query should be replaced by authmodule
+ /// FIXME v mysql query should be replaced by authmodule
$userlist = dbFetchRows("SELECT * FROM `users`");
foreach ($userlist as $userentry)
{
diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php
index f293c2d85..d3947acf2 100644
--- a/html/pages/device.inc.php
+++ b/html/pages/device.inc.php
@@ -184,7 +184,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
');
}
- ### $loadbalancer_tabs is used in device/loadbalancer/ to build the submenu. we do it here to save queries
+ /// $loadbalancer_tabs is used in device/loadbalancer/ to build the submenu. we do it here to save queries
if ($device['os'] == "netscaler") /// Netscaler
{
@@ -207,7 +207,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
');
}
- ### $routing_tabs is used in device/routing/ to build the tabs menu. we built it here to save some queries
+ /// $routing_tabs is used in device/routing/ to build the tabs menu. we built it here to save some queries
$device_routing_count['loadbalancer_rservers'] = dbFetchCell("SELECT COUNT(*) FROM `loadbalancer_rservers` WHERE `device_id` = ?", array($device['device_id']));
if ($device_routing_count['loadbalancer_rservers']) { $routing_tabs[] = 'loadbalancer_rservers'; }
diff --git a/html/pages/device/graphs.inc.php b/html/pages/device/graphs.inc.php
index 17cc8c58c..e90409f97 100644
--- a/html/pages/device/graphs.inc.php
+++ b/html/pages/device/graphs.inc.php
@@ -1,7 +1,7 @@
'device',
'device' => $device['device_id'],
diff --git a/html/pages/device/hrdevice.inc.php b/html/pages/device/hrdevice.inc.php
index 661f76714..37adc1213 100644
--- a/html/pages/device/hrdevice.inc.php
+++ b/html/pages/device/hrdevice.inc.php
@@ -2,7 +2,7 @@
echo('');
-# FIXME missing heading
+/// FIXME missing heading
foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `hrDeviceIndex`", array($device['device_id'])) as $hrdevice)
{
@@ -45,7 +45,7 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
$graph_array['from'] = $config['time']['day'];
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
- # FIXME click on graph should also link to port, but can't use generate_port_link here...
+ /// FIXME click on graph should also link to port, but can't use generate_port_link here...
$mini_graph = overlib_link(generate_port_url($interface), generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
echo("$mini_graph ");
diff --git a/html/pages/device/loadbalancer.inc.php b/html/pages/device/loadbalancer.inc.php
index 84ce3010d..97b339ff7 100644
--- a/html/pages/device/loadbalancer.inc.php
+++ b/html/pages/device/loadbalancer.inc.php
@@ -4,11 +4,11 @@ $link_array = array('page' => 'device',
'device' => $device['device_id'],
'tab' => 'loadbalancer');
-## Cisco ACE
+/// Cisco ACE
$type_text['loadbalancer_rservers'] = "Rservers";
$type_text['loadbalancer_vservers'] = "Serverfarms";
-## Citrix Netscaler
+/// Citrix Netscaler
$type_text['netscaler_vsvr'] = "VServers";
print_optionbar_start();
diff --git a/html/pages/device/munin.inc.php b/html/pages/device/munin.inc.php
index 1d0498c34..59126dfbd 100644
--- a/html/pages/device/munin.inc.php
+++ b/html/pages/device/munin.inc.php
@@ -1,7 +1,7 @@
'device',
'device' => $device['device_id'],
diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php
index b16739191..caf493beb 100644
--- a/html/pages/device/overview.inc.php
+++ b/html/pages/device/overview.inc.php
@@ -57,7 +57,7 @@ if ($services['total'])
echo("");
}
-### FIXME - split this into overview/syslog.inc.php?
+/// FIXME - split this into overview/syslog.inc.php?
if ($config['enable_syslog'])
{
$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']));
@@ -76,7 +76,7 @@ echo("");
echo("");
-### Right Pane
+/// Right Pane
include("overview/processors.inc.php");
include("overview/mempools.inc.php");
include("overview/storage.inc.php");
diff --git a/html/pages/device/overview/generic/sensor.inc.php b/html/pages/device/overview/generic/sensor.inc.php
index 01456d55b..4f989040e 100644
--- a/html/pages/device/overview/generic/sensor.inc.php
+++ b/html/pages/device/overview/generic/sensor.inc.php
@@ -19,9 +19,9 @@ if (count($sensors))
$sensor['sensor_current'] = "NaN";
}
- ### FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
- ### FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
- ### FIXME - DUPLICATED IN health/sensors
+ /// FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
+ /// FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
+ /// FIXME - DUPLICATED IN health/sensors
$graph_colour = str_replace("#", "", $row_colour);
diff --git a/html/pages/device/port.inc.php b/html/pages/device/port.inc.php
index 5420ff482..1e64312cc 100644
--- a/html/pages/device/port.inc.php
+++ b/html/pages/device/port.inc.php
@@ -67,7 +67,7 @@ $link_array = array('page' => 'device',
'port' => $port['port_id']);
$menu_options['graphs'] = 'Graphs';
-$menu_options['realtime'] = 'Real time'; ### FIXME CONDITIONAL
+$menu_options['realtime'] = 'Real time'; /// FIXME CONDITIONAL
$menu_options['arp'] = 'ARP Table';
$menu_options['events'] = 'Eventlog';
@@ -129,8 +129,8 @@ if (dbFetchCell("SELECT count(*) FROM mac_accounting WHERE port_id = '".$port['p
if (dbFetchCell("SELECT COUNT(*) FROM juniAtmVp WHERE port_id = '".$port['port_id']."'") > "0" )
{
- ### FIXME ATM VPs
- ### FIXME URLs BROKEN
+ /// FIXME ATM VPs
+ /// FIXME URLs BROKEN
echo(" | ATM VPs : ");
if ($vars['view'] == "junose-atm-vp" && $vars['graph'] == "bits") { echo("
");
- echo(""); ## Close Syslog Div
+ echo(""); /// Close Syslog Div
} else {
- ## Open eventlog Div
+ /// Open eventlog Div
echo("
Recent Eventlog Entries
");
@@ -206,7 +206,7 @@ if ($config['enable_syslog'])
}
echo("");
- echo(""); ## Close Syslog Div
+ echo(""); /// Close Syslog Div
}
echo("");
diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php
index 82e64755f..a64eec6ef 100644
--- a/html/pages/graphs.inc.php
+++ b/html/pages/graphs.inc.php
@@ -2,7 +2,7 @@
unset($vars['page']);
-### Setup here
+/// Setup here
if($_SESSION['widescreen'])
{
@@ -46,7 +46,7 @@ if (!$auth)
}
# Load our list of available graphtypes for this object
- # FIXME not all of these are going to be valid
+ /// FIXME not all of these are going to be valid
if ($handle = opendir($config['install_dir'] . "/html/includes/graphs/".$type."/"))
{
while (false !== ($file = readdir($handle)))
@@ -238,7 +238,7 @@ if (!$auth)
echo(generate_link("Hide Legend",$vars, array('page' => "graphs", 'legend' => "no")));
}
- ### FIXME : do this properly
+ /// FIXME : do this properly
# if ($type == "port" && $subtype == "bits")
# {
echo(' | ');
diff --git a/html/pages/health.inc.php b/html/pages/health.inc.php
index 2945f88ee..3b38b8e5b 100644
--- a/html/pages/health.inc.php
+++ b/html/pages/health.inc.php
@@ -10,7 +10,7 @@ if ($used_sensors['current']) $datas[] = 'current';
if ($used_sensors['power']) $datas[] = 'power';
if ($used_sensors['dBm']) $datas[] = 'dBm';
-# FIXME generalize -> static-config ?
+/// FIXME generalize -> static-config ?
$type_text['overview'] = "Overview";
$type_text['temperature'] = "Temperature";
$type_text['humidity'] = "Humidity";
diff --git a/html/pages/health/processor.inc.php b/html/pages/health/processor.inc.php
index 4d0a7fcc8..2e76c202e 100644
--- a/html/pages/health/processor.inc.php
+++ b/html/pages/health/processor.inc.php
@@ -18,7 +18,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
{
$device = $proc;
- # FIXME should that really be done here? :-)
+ /// FIXME should that really be done here? :-)
$text_descr = $proc['processor_descr'];
$text_descr = str_replace("Routing Processor", "RP", $text_descr);
$text_descr = str_replace("Switching Processor", "SP", $text_descr);
diff --git a/html/pages/health/sensors.inc.php b/html/pages/health/sensors.inc.php
index 9f004921f..17a04078c 100644
--- a/html/pages/health/sensors.inc.php
+++ b/html/pages/health/sensors.inc.php
@@ -1,6 +1,6 @@
= '5')
{
@@ -39,9 +39,9 @@ foreach (dbFetchRows($sql, $param) as $sensor)
if ($sensor['sensor_current'] >= $sensor['sensor_limit']) { $alert = ' '; } else { $alert = ""; }
}
- ### FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
- ### FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
- ### FIXME - DUPLICATED IN device/overview/sensors
+ /// FIXME - make this "four graphs in popup" a function/include and "small graph" a function.
+ /// FIXME - So now we need to clean this up and move it into a function. Isn't it just "print-graphrow"?
+ /// FIXME - DUPLICATED IN device/overview/sensors
$graph_colour = str_replace("#", "", $row_colour);
diff --git a/html/pages/ports.inc.php b/html/pages/ports.inc.php
index 04a4d0fe7..485dae46d 100644
--- a/html/pages/ports.inc.php
+++ b/html/pages/ports.inc.php
@@ -2,7 +2,7 @@
$pagetitle[] = "Ports";
-### Set Defaults here
+/// Set Defaults here
if(!isset($vars['format'])) { $vars['format'] = "list_basic"; }
@@ -96,9 +96,9 @@ foreach ($ports as $data)
All Locations
'down')));
}
- ## End BGP Menu
+ /// End BGP Menu
if (!isset($vars['view'])) { $vars['view'] = 'details'; }
@@ -184,7 +184,7 @@ else
$this_afisafi = $afi.$safi;
$peer['afi'] .= $sep . $afi .".".$safi;
$sep = " ";
- $peer['afisafi'][$this_afisafi] = 1; ## Build a list of valid AFI/SAFI for this peer
+ $peer['afisafi'][$this_afisafi] = 1; /// Build a list of valid AFI/SAFI for this peer
}
unset($sep);
diff --git a/html/pages/routing/ospf.inc.php b/html/pages/routing/ospf.inc.php
index dacf7362e..a4b9a2729 100644
--- a/html/pages/routing/ospf.inc.php
+++ b/html/pages/routing/ospf.inc.php
@@ -5,7 +5,7 @@ $i_i = "0";
echo('');
echo('Device Router Id Status ABR ASBR Areas Ports Neighbours ');
-#### Loop Instances
+/// Loop Instances
foreach (dbFetchRows("SELECT * FROM `ospf_instances` WHERE `ospfAdminStat` = 'enabled'") as $instance)
{
@@ -40,7 +40,7 @@ foreach (dbFetchRows("SELECT * FROM `ospf_instances` WHERE `ospfAdminStat` = 'en
echo('');
$i_i++;
-} ### End loop instances
+} /// End loop instances
echo('
');
diff --git a/html/pages/routing/vrf.inc.php b/html/pages/routing/vrf.inc.php
index 5d0e10a67..f068d0e55 100644
--- a/html/pages/routing/vrf.inc.php
+++ b/html/pages/routing/vrf.inc.php
@@ -177,6 +177,6 @@ if($_GET['optb'] == "all" ) {
include("includes/error-no-perm.inc.php");
-} ## End Permission if
+} /// End Permission if
?>
diff --git a/includes/cisco-entities.php b/includes/cisco-entities.php
index c3aa33b47..c0a0e2c52 100755
--- a/includes/cisco-entities.php
+++ b/includes/cisco-entities.php
@@ -1,6 +1,6 @@
'C7200-IO-FE-MII',
diff --git a/includes/common.php b/includes/common.php
index 1a2dd7d07..ded3bde41 100644
--- a/includes/common.php
+++ b/includes/common.php
@@ -1,6 +1,6 @@
id too.
+ /// FIXME - cache name > id too.
return device_by_id_cache(getidbyname($name), $refresh);
}
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index 8e4d1d967..c175cbcc4 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -19,13 +19,13 @@
*
*/
-####
-#### Please don't edit this file -- make changes to the configuration array in config.php
-####
+///
+/// Please don't edit this file -- make changes to the configuration array in config.php
+///
error_reporting(E_ERROR);
-### Default directories
+/// Default directories
$config['temp_dir'] = "/tmp";
$config['install_dir'] = "/opt/observium";
@@ -33,10 +33,10 @@ $config['html_dir'] = $config['install_dir'] . "/html";
$config['rrd_dir'] = $config['install_dir'] . "/rrd";
$config['log_file'] = $config['install_dir'] . "/observium.log";
-### What is my own hostname (used so observium can identify its host in its own database)
+/// What is my own hostname (used so observium can identify its host in its own database)
$config['own_hostname'] = "localhost";
-### Location of executables
+/// Location of executables
$config['rrdtool'] = "/usr/bin/rrdtool";
$config['fping'] = "/usr/bin/fping";
@@ -57,21 +57,21 @@ $config['neato'] = "/usr/bin/neato";
$config['sfdp'] = "/usr/bin/sfdp";
$config['svn'] = "/usr/bin/svn";
-### Memcached - Keep immediate statistics
+/// Memcached - Keep immediate statistics
$config['memcached']['enable'] = FALSE;
$config['memcached']['host'] = "localhost";
$config['memcached']['port'] = 11211;
-$config['slow_statistics'] = TRUE; ### THIS WILL CHANGE TO FALSE IN FUTURE
+$config['slow_statistics'] = TRUE; /// THIS WILL CHANGE TO FALSE IN FUTURE
-### RRD Format Settings
-### These should not normally be changed
-### Though one could conceivably increase or decrease the size of each RRA if one had performance problems
-### Or if one had a very fast I/O subsystem with no performance worries.
+/// RRD Format Settings
+/// These should not normally be changed
+/// Though one could conceivably increase or decrease the size of each RRA if one had performance problems
+/// Or if one had a very fast I/O subsystem with no performance worries.
$config['rrd_rra'] = " RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 ";
$config['rrd_rra'] .= " RRA:MAX:0.5:1:720 RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 ";
@@ -79,11 +79,11 @@ $config['rrd_rra'] .= " RRA:MAX:0.5:1:720 RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:
$config['rrd_rra'] .= " RRA:LAST:0.5:1:1440 ";
-### RRDCacheD - Make sure it can write to your RRD dir!
+/// RRDCacheD - Make sure it can write to your RRD dir!
#$config['rrdcached'] = "unix:/var/run/rrdcached.sock";
-### Web Interface Settings
+/// Web Interface Settings
if (isset($_SERVER["SERVER_NAME"]) && isset($_SERVER["SERVER_PORT"]))
{
@@ -103,7 +103,7 @@ $config['stylesheet'] = "css/styles.css";
$config['mono_font'] = "DejaVuSansMono";
$config['favicon'] = "images/observium-icon.png";
$config['header_color'] = "#1F334E";
-$config['page_refresh'] = "300"; ## Refresh the page every xx seconds, 0 to disable
+$config['page_refresh'] = "300"; /// Refresh the page every xx seconds, 0 to disable
$config['front_page'] = "pages/front/default.php";
$config['page_title_prefix'] = "Observium :: Network Observation and Monitoring";
$config['timestamp_format'] = 'd-m-Y H:i:s';
@@ -111,7 +111,7 @@ $config['page_gen'] = 1;
$config['web_header'] = "header.inc.php"; # in html/includes
$config['login_message'] = "Unauthorised access or use shall render the user liable to criminal and/or civil prosecution.";
-$config['old_graphs'] = 1; ## RRDfiles from before the great rra reform. This is default for a while.
+$config['old_graphs'] = 1; /// RRDfiles from before the great rra reform. This is default for a while.
$config['int_customers'] = 1; # Enable Customer Port Parsing
$config['int_transit'] = 1; # Enable Transit Types
@@ -122,9 +122,9 @@ $config['int_l2tp'] = 0; # Enable L2TP Port Types
$config['show_locations'] = 1; # Enable Locations on menu
$config['show_locations_dropdown'] = 1; # Enable Locations dropdown on menu
$config['show_services'] = 0; # Enable Services on menu
-$config['ports_page_default'] = "details"; ## eg "details" or "basic"
+$config['ports_page_default'] = "details"; /// eg "details" or "basic"
-### SNMP Settings - Timeouts/Retries disabled as default
+/// SNMP Settings - Timeouts/Retries disabled as default
#$config['snmp']['timeout'] = 1; # timeout in seconds
#$config['snmp']['retries'] = 5; # how many times to retry the query
$config['snmp']['transports'] = array('udp', 'udp6', 'tcp', 'tcp6');
@@ -143,54 +143,54 @@ $config['snmp']['v3'][0]['authalgo'] = "MD5"; # MD5 | SHA
$config['snmp']['v3'][0]['cryptopass'] = ""; # Privacy (Encryption) Passphrase
$config['snmp']['v3'][0]['cryptoalgo'] = "AES"; # AES | DES
-### RRD Format Settings
-### These should not normally be changed
-### Though one could conceivably increase or decrease the size of each RRA if one had performance problems
-### Or if one had a very fast I/O subsystem with no performance worries.
+/// RRD Format Settings
+/// These should not normally be changed
+/// Though one could conceivably increase or decrease the size of each RRA if one had performance problems
+/// Or if one had a very fast I/O subsystem with no performance worries.
$config['rrd_rra'] = " RRA:AVERAGE:0.5:1:2016 RRA:AVERAGE:0.5:6:1440 RRA:AVERAGE:0.5:24:1440 RRA:AVERAGE:0.5:288:1440 ";
$config['rrd_rra'] .= " RRA:MAX:0.5:1:720 RRA:MIN:0.5:6:1440 RRA:MIN:0.5:24:775 RRA:MIN:0.5:288:797 ";
$config['rrd_rra'] .= " RRA:MAX:0.5:1:720 RRA:MAX:0.5:6:1440 RRA:MAX:0.5:24:775 RRA:MAX:0.5:288:797 ";
$config['rrd_rra'] .= " RRA:LAST:0.5:1:1440 ";
-### Autodiscovery Settings
+/// Autodiscovery Settings
-$config['autodiscovery']['xdp'] = TRUE; ## Autodiscover hosts via discovery protocols
-$config['autodiscovery']['ospf'] = TRUE; ## Autodiscover hosts via OSPF
-$config['autodiscovery']['bgp'] = TRUE; ## Autodiscover hosts via BGP
-$config['autodiscovery']['snmpscan'] = TRUE; ## autodiscover hosts via SNMP scanning
+$config['autodiscovery']['xdp'] = TRUE; /// Autodiscover hosts via discovery protocols
+$config['autodiscovery']['ospf'] = TRUE; /// Autodiscover hosts via OSPF
+$config['autodiscovery']['bgp'] = TRUE; /// Autodiscover hosts via BGP
+$config['autodiscovery']['snmpscan'] = TRUE; /// autodiscover hosts via SNMP scanning
-$config['discover_services'] = FALSE; ## Autodiscover services via SNMP on devices of type "server"
+$config['discover_services'] = FALSE; /// Autodiscover services via SNMP on devices of type "server"
-### Mailer backend Settings
+/// Mailer backend Settings
-$config['email_backend'] = 'mail'; ## Mail backend. Allowed: "mail" (PHP's built-in), "sendmail", "smtp".
-$config['email_from'] = NULL; ## Mail from. Default: "OBSERVIUM Network Monitor"
-$config['email_sendmail_path'] = '/usr/sbin/sendmail'; ## The location of the sendmail program.
-$config['email_smtp_host'] = 'localhost'; ## Outgoing SMTP server name.
-$config['email_smtp_port'] = 25; ## The port to connect.
-$config['email_smtp_timeout'] = 10; ## SMTP connection timeout in seconds.
-$config['email_smtp_secure'] = NULL; ## Enable encryption. Use 'tls' or 'ssl'
-$config['email_smtp_auth'] = FALSE; ## Whether or not to use SMTP authentication.
-$config['email_smtp_username'] = NULL; ## SMTP username.
-$config['email_smtp_password'] = NULL; ## Password for SMTP authentication.
+$config['email_backend'] = 'mail'; /// Mail backend. Allowed: "mail" (PHP's built-in), "sendmail", "smtp".
+$config['email_from'] = NULL; /// Mail from. Default: "OBSERVIUM Network Monitor"
+$config['email_sendmail_path'] = '/usr/sbin/sendmail'; /// The location of the sendmail program.
+$config['email_smtp_host'] = 'localhost'; /// Outgoing SMTP server name.
+$config['email_smtp_port'] = 25; /// The port to connect.
+$config['email_smtp_timeout'] = 10; /// SMTP connection timeout in seconds.
+$config['email_smtp_secure'] = NULL; /// Enable encryption. Use 'tls' or 'ssl'
+$config['email_smtp_auth'] = FALSE; /// Whether or not to use SMTP authentication.
+$config['email_smtp_username'] = NULL; /// SMTP username.
+$config['email_smtp_password'] = NULL; /// Password for SMTP authentication.
-### Alerting Settings
+/// Alerting Settings
-$config['alerts']['email']['default'] = NULL; ## Default alert recipient
-$config['alerts']['email']['default_only'] = FALSE; ## Only use default recipient
-$config['alerts']['email']['enable'] = TRUE; ## Enable email alerts
-$config['alerts']['bgp']['whitelist'] = NULL; ## Populate as an array() with ASNs to alert on.
-$config['alerts']['port']['ifdown'] = FALSE; ## Generate alerts for ports that go down
+$config['alerts']['email']['default'] = NULL; /// Default alert recipient
+$config['alerts']['email']['default_only'] = FALSE; /// Only use default recipient
+$config['alerts']['email']['enable'] = TRUE; /// Enable email alerts
+$config['alerts']['bgp']['whitelist'] = NULL; /// Populate as an array() with ASNs to alert on.
+$config['alerts']['port']['ifdown'] = FALSE; /// Generate alerts for ports that go down
-### Port bandwidth threshold percentage %age utilisation above this will cause an alert
+/// Port bandwidth threshold percentage %age utilisation above this will cause an alert
-$config['alerts']['port_util_alert'] = FALSE; ## Disabled as default
-$config['alerts']['port_util_perc'] = 85; ## %age above which to alert
+$config['alerts']['port_util_alert'] = FALSE; /// Disabled as default
+$config['alerts']['port_util_perc'] = 85; /// %age above which to alert
-$config['uptime_warning'] = "84600"; ## Time in seconds to display a "Device Rebooted" Alert. 0 to disable warnings.
+$config['uptime_warning'] = "84600"; /// Time in seconds to display a "Device Rebooted" Alert. 0 to disable warnings.
-### Cosmetics
+/// Cosmetics
$config['rrdgraph_def_text'] = "-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5";
$config['rrdgraph_def_text'] .= " -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal";
@@ -207,18 +207,18 @@ $list_highlight = "#ffcccc";
$warn_colour_a = "#ffeeee";
$warn_colour_b = "#ffcccc";
-#$config['graph_colours'] = array("000066","330066","990066","990066","CC0033","FF0000"); ## Purple to Red
-#$config['graph_colours'] = array("006600","336600","996600","996600","CC3300","FF0000"); ## Green to Red
-#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00CC00"); ## Green
-#$config['graph_colours'] = array("220000","440000","660000","880000","AA0000","CC0000"); ## Red
-#$config['graph_colours'] = array("001122","002244","003366","004488","0055AA","0066CC"); ## Blue
-#$config['graph_colours'] = array("002233","004466","006699","0088CC","0099FF"); ## Sky-Blue
-#$config['graph_colours'] = array("110022","330066","440088","6600AA","8800FF"); ## Purple
-#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00AA00","00CC00"); ## Forest Greens
-#$config['graph_colours']['greens'] = array("112200","224400","336600","448800","66AA00","88FF00"); ## Grass Greens
+#$config['graph_colours'] = array("000066","330066","990066","990066","CC0033","FF0000"); /// Purple to Red
+#$config['graph_colours'] = array("006600","336600","996600","996600","CC3300","FF0000"); /// Green to Red
+#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00CC00"); /// Green
+#$config['graph_colours'] = array("220000","440000","660000","880000","AA0000","CC0000"); /// Red
+#$config['graph_colours'] = array("001122","002244","003366","004488","0055AA","0066CC"); /// Blue
+#$config['graph_colours'] = array("002233","004466","006699","0088CC","0099FF"); /// Sky-Blue
+#$config['graph_colours'] = array("110022","330066","440088","6600AA","8800FF"); /// Purple
+#$config['graph_colours'] = array("002200","004400","006600","008800","00AA00","00AA00","00CC00"); /// Forest Greens
+#$config['graph_colours']['greens'] = array("112200","224400","336600","448800","66AA00","88FF00"); /// Grass Greens
#$config['graph_colours']['greens'] = array("95FFA7","4EFF97","33FF66","336600","224400","112200");
#$config['graph_colours']['greens'] = array("B7d6A9","8fcb73","50b91d","3ab419","0a8612","034f11");
-#$config['graph_colours']['blues'] = array("b5d7ff","6eb7ff","0064ff","0082ff","0019d5","0016cb","00007d"); ## Cold Blues
+#$config['graph_colours']['blues'] = array("b5d7ff","6eb7ff","0064ff","0082ff","0019d5","0016cb","00007d"); /// Cold Blues
$config['graph_colours']['mixed'] = array('CC0000','008C00','4096EE','73880A','D01F3C','36393D','FF0084');
$config['graph_colours']['oranges'] = array('E43C00','E74B00','EB5B00','EF6A00','F37900','F78800','FB9700','FFA700');
@@ -228,20 +228,20 @@ $config['graph_colours']['blues'] = array('A0A0E5','8080BD','606096','40406F',
$config['graph_colours']['purples'] = array('CC7CCC','AF63AF','934A93','773177','5B185B','3F003F');
$config['graph_colours']['default'] = $config['graph_colours']['blues'];
-### Device page options
+/// Device page options
$config['show_overview_tab'] = TRUE;
-### The device overview page options
+/// The device overview page options
$config['overview_show_sysDescr'] = TRUE;
-### Enable version checker & stats
+/// Enable version checker & stats
$config['version_check'] = 1; # Enable checking of version in discovery
# and submittal of basic stats used
# to prioritise development effort :)
-### Poller/Discovery Modules
+/// Poller/Discovery Modules
$config['enable_bgp'] = 1; # Enable BGP session collection and display
$config['enable_rip'] = 1; # Enable RIP session collection and display
@@ -255,7 +255,7 @@ $config['enable_vrfs'] = 1; # Enable VRFs
$config['enable_printers'] = 0; # Enable Printer support
$config['enable_sla'] = 0; # Enable Cisco SLA collection and display
-### Ports extension modules
+/// Ports extension modules
$config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse port descriptions into fields
$config['enable_ports_Xbcmc'] = 1; # Enable ifXEntry broadcast/multicast
@@ -264,7 +264,7 @@ $config['enable_ports_junoseatmvp'] = 0; # Enable JunOSe ATM VC Discovery/Po
$config['enable_ports_adsl'] = 1; # Enable ADSL-LINE-MIB
$config['enable_ports_poe'] = 0; # Enable PoE stats collection
-### Billing System Configuration
+/// Billing System Configuration
$config['enable_billing'] = 0; # Enable Billing
$config['billing']['customer_autoadd'] = 0; # Enable Auto-add bill per customer
@@ -272,7 +272,7 @@ $config['billing']['circuit_autoadd'] = 0; # Enable Auto-add bill per circuit_
$config['billing']['bill_autoadd'] = 0; # Enable Auto-add bill per bill_id
$config['billing']['base'] = 1000; # Set the base to divider bytes to kB, MB, GB ,... (1000|1024)
-### External Integration
+/// External Integration
#$config['rancid_configs'][] = '/var/lib/rancid/network/configs/';
$config['rancid_ignorecomments'] = 0; # Ignore lines starting with #
@@ -285,11 +285,11 @@ $config['nfsen_enable'] = 0;
#$config['nfsen_rrds'] = "/var/nfsen/profiles-stat/live/";
#$config['nfsen_suffix'] = "_yourdomain_com";
-### Location Mapping
-### Use this feature to map ugly locations to pretty locations
+/// Location Mapping
+/// Use this feature to map ugly locations to pretty locations
#config['location_map']['Under the Sink'] = "Under The Sink, The Office, London, UK";
-### Ignores & Allows
+/// Ignores & Allows
# Has to be lowercase
$config['bad_if'][] = "voip-null";
@@ -313,9 +313,9 @@ $config['bad_if'][] = "span rp";
$config['bad_if'][] = "span sp";
$config['bad_if'][] = "sslvpn";
$config['bad_if'][] = "pppoe-";
-#$config['bad_if'][] = "control plane"; ## Example for cisco control plane
+#$config['bad_if'][] = "control plane"; /// Example for cisco control plane
-### Ignore ports based on ifType. Case-sensitive.
+/// Ignore ports based on ifType. Case-sensitive.
$config['bad_iftype'][] = "voiceEncap";
$config['bad_iftype'][] = "voiceFXO";
@@ -343,7 +343,7 @@ $config['ignore_mount_removable'] = 1; # Ignore removable disk storage
$config['ignore_mount_network'] = 1; # Ignore network mounted storage
$config['ignore_mount_optical'] = 1; # Ignore mounted optical discs
-### Per-device interface graph filters
+/// Per-device interface graph filters
$config['device_traffic_iftype'][] = '/loopback/';
$config['device_traffic_iftype'][] = '/tunnel/';
@@ -361,20 +361,20 @@ $config['device_traffic_descr'][] = '/bond/';
$config['device_traffic_descr'][] = '/null/';
$config['device_traffic_descr'][] = '/dummy/';
-### IRC Bot configuration
+/// IRC Bot configuration
$config['irc_host'] = "chat.eu.freenode.net";
$config['irc_port'] = 6667;
$config['irc_nick'] = "Observium";
$config['irc_chan'][] = "#observium";
-### Authentication
+/// Authentication
$config['allow_unauth_graphs'] = 0; # Allow graphs to be viewed by anyone
$config['allow_unauth_graphs_cidr'] = array(); # Allow graphs to be viewed without authorisation from certain IP ranges
$config['auth_mechanism'] = "mysql"; # Available mechanisms: mysql (default), ldap, http-auth
-### LDAP Authentication
+/// LDAP Authentication
$config['auth_ldap_version'] = 3; # v2 or v3
$config['auth_ldap_server'] = "ldap.yourserver.com";
@@ -388,7 +388,7 @@ $config['auth_ldap_groups']['admin']['level'] = 10;
$config['auth_ldap_groups']['pfy']['level'] = 7;
$config['auth_ldap_groups']['support']['level'] = 1;
-### Sensors
+/// Sensors
$config['allow_entity_sensor']['amperes'] = 1;
$config['allow_entity_sensor']['celsius'] = 1;
@@ -399,7 +399,7 @@ $config['allow_entity_sensor']['watts'] = 1;
$config['allow_entity_sensor']['truthvalue'] = 1;
$config['allow_entity_sensor']['specialEnum'] = 1;
-### Filesystems
+/// Filesystems
$config['ignore_mount'][] = "/kern";
$config['ignore_mount'][] = "/mnt/cdrom";
@@ -426,25 +426,25 @@ $config['ignore_mount_regexp'][] = "/UMA/";
$config['ignore_mount_removable'] = 1; # Ignore removable disk storage
$config['ignore_mount_network'] = 1; # Ignore network mounted storage
-### Syslog Settings
+/// Syslog Settings
-$config['syslog_age'] = "1 month"; ## Entries older than this will be removed
+$config['syslog_age'] = "1 month"; /// Entries older than this will be removed
$config['syslog_filter'][] = "last message repeated";
$config['syslog_filter'][] = "Connection from UDP: [";
$config['syslog_filter'][] = "ipSystemStatsTable node ipSystemStatsOutFragOKs not implemented";
-$config['syslog_filter'][] = "diskio.c"; ## Ignore some crappy stuff from SNMP daemon
+$config['syslog_filter'][] = "diskio.c"; /// Ignore some crappy stuff from SNMP daemon
-### Virtualization
+/// Virtualization
$config['enable_libvirt'] = 0; # Enable Libvirt VM support
$config['libvirt_protocols'] = array("qemu+ssh","xen+ssh"); # Mechanisms used, add or remove if not using this on any of your machines.
-### Hardcoded ASN descriptions
+/// Hardcoded ASN descriptions
$config['astext'][65332] = "Cymru FullBogon Feed";
$config['astext'][65333] = "Cymru Bogon Feed";
-### Nicer labels for the SLA types
+/// Nicer labels for the SLA types
$config['sla_type_labels']['echo'] = 'ICMP ping';
$config['sla_type_labels']['pathEcho'] = 'Path ICMP ping';
$config['sla_type_labels']['fileIO'] = 'File I/O';
@@ -467,11 +467,11 @@ $config['sla_type_labels']['ethernetPing'] = 'Ethernet ping';
$config['sla_type_labels']['ethernetJitter'] = 'Ethernet jitter';
$config['sla_type_labels']['lspPingPseudowire'] = 'LSP Pseudowire ping';
-### Warnings on front page
-$config['warn']['ifdown'] = TRUE; ## Show down interfaces
+/// Warnings on front page
+$config['warn']['ifdown'] = TRUE; /// Show down interfaces
-## List of poller modules. Need to be in the array to be
-## considered for execution.
+/// List of poller modules. Need to be in the array to be
+/// considered for execution.
$config['poller_modules']['unix-agent'] = 0;
$config['poller_modules']['system'] = 1;
@@ -505,8 +505,8 @@ $config['poller_modules']['aruba-controller'] = 1;
$config['poller_modules']['entity-physical'] = 1;
$config['poller_modules']['applications'] = 1;
-## List of discovery modules. Need to be in this array to be
-## considered for execution.
+/// List of discovery modules. Need to be in this array to be
+/// considered for execution.
$config['discovery_modules']['ports'] = 1;
$config['discovery_modules']['ports-stack'] = 1;
diff --git a/includes/definitions.inc.php b/includes/definitions.inc.php
index fe890b18f..f1cfbae3c 100644
--- a/includes/definitions.inc.php
+++ b/includes/definitions.inc.php
@@ -1,10 +1,10 @@
$blah)
}
}
-### Graph Types
+/// Graph Types
$config['graph_sections'] = array('general', 'system', 'firewall', 'netstats', 'wireless', 'storage', 'vpdn', 'load balancer');
@@ -1075,7 +1075,7 @@ $config['graph_types']['device']['netscaler_tcp_pkts']['descr'] = 'TCP Packets';
$config['graph_descr']['device_smokeping_in_all'] = "This is an aggregate graph of the incoming smokeping tests to this host. The line corresponds to the average RTT. The shaded area around each line denotes the standard deviation.";
$config['graph_descr']['device_processor'] = "This is an aggregate graph of all processors in the system.";
-### Device Types
+/// Device Types
$i = 0;
$config['device_types'][$i]['text'] = 'Servers';
@@ -1125,9 +1125,9 @@ if (isset($config['enable_printers']) && $config['enable_printers'])
$config['device_types'][$i]['icon'] = 'printer.png';
}
-##############################
+//////////////////////////////
# No changes below this line #
-##############################
+//////////////////////////////
$config['version'] = "0.SVN.ERROR";
@@ -1183,7 +1183,7 @@ if (isset($_SERVER['HTTPS']))
$config['base_url'] = preg_replace('/^http:/','https:', $config['base_url']);
}
-### Connect to database
+/// Connect to database
$observium_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
if (!$observium_link)
{
@@ -1233,7 +1233,7 @@ $config['ipmi_unit']['RPM'] = 'fanspeed';
$config['ipmi_unit']['Watts'] = 'power';
$config['ipmi_unit']['discrete'] = '';
-## INCLUDE THE VMWARE DEFINITION FILE.
+/// INCLUDE THE VMWARE DEFINITION FILE.
require_once("vmware_guestid.inc.php");
?>
diff --git a/includes/discovery/bgp-peers.inc.php b/includes/discovery/bgp-peers.inc.php
index 783732c7f..0796556df 100755
--- a/includes/discovery/bgp-peers.inc.php
+++ b/includes/discovery/bgp-peers.inc.php
@@ -4,7 +4,7 @@ global $debug;
if ($config['enable_bgp'])
{
- ### Discover BGP peers
+ /// Discover BGP peers
echo("BGP Sessions : ");
@@ -36,11 +36,11 @@ if ($config['enable_bgp'])
if ($device['os'] == "junos")
{
- ## Juniper BGP4-V2 MIB
+ /// Juniper BGP4-V2 MIB
- ## FIXME: needs a big cleanup! also see below.
+ /// FIXME: needs a big cleanup! also see below.
- # FIXME: is .0.ipv6 the only possible value here?
+ /// FIXME: is .0.ipv6 the only possible value here?
$result = snmp_walk($device, "jnxBgpM2PeerRemoteAs.0.ipv6", "-Onq", "BGP4-V2-MIB-JUNIPER", $config['install_dir']."/mibs/junos");
$peers = trim(str_replace(".1.3.6.1.4.1.2636.5.1.1.2.1.1.1.13.0.","", $result));
foreach (explode("\n", $peers) as $peer)
@@ -65,7 +65,7 @@ if ($config['enable_bgp'])
} # End if
} # End if
- ## Process disovered peers
+ /// Process disovered peers
if (isset($peerlist))
{
@@ -87,7 +87,7 @@ if ($config['enable_bgp'])
if ($device['os_group'] == "cisco")
{
- ## Get afi/safi and populate cbgp on cisco ios (xe/xr)
+ /// Get afi/safi and populate cbgp on cisco ios (xe/xr)
unset($af_list);
$af_data = snmp_walk($device, "cbgpPeerAddrFamilyName." . $peer['ip'], "-OsQ", "CISCO-BGP4-MIB", $config['mibdir']);
@@ -182,7 +182,7 @@ if ($config['enable_bgp'])
unset($j_peerIndexes);
} # isset
- ### Delete removed peers
+ /// Delete removed peers
$sql = "SELECT * FROM bgpPeers AS B, devices AS D WHERE B.device_id = D.device_id AND D.device_id = '".$device['device_id']."'";
$query = mysql_query($sql);
diff --git a/includes/discovery/cisco-cef.inc.php b/includes/discovery/cisco-cef.inc.php
index fca69dfe4..7c30dca73 100755
--- a/includes/discovery/cisco-cef.inc.php
+++ b/includes/discovery/cisco-cef.inc.php
@@ -45,7 +45,7 @@ if (is_array($cefs))
}
}
-## FIXME - need to delete old ones. FIXME REALLY.
+/// FIXME - need to delete old ones. FIXME REALLY.
echo("\n");
diff --git a/includes/discovery/cisco-entity-sensor.inc.php b/includes/discovery/cisco-entity-sensor.inc.php
index 7415e314a..5948400b9 100644
--- a/includes/discovery/cisco-entity-sensor.inc.php
+++ b/includes/discovery/cisco-entity-sensor.inc.php
@@ -65,7 +65,7 @@ if ($device['os_group'] == "cisco")
$descr = rewrite_entity_descr($descr);
}
- ## Set description based on measured entity if it exists
+ /// Set description based on measured entity if it exists
if (is_numeric($entry['entSensorMeasuredEntity']) && $entry['entSensorMeasuredEntity'])
{
$measured_descr = $entity_array[$entry['entSensorMeasuredEntity']]['entPhysicalName'];
@@ -77,7 +77,7 @@ if ($device['os_group'] == "cisco")
$descr = $measured_descr . " - " . $descr;
}
- ### Bit dirty also, clean later
+ /// Bit dirty also, clean later
$descr = str_replace("Temp: ", "", $descr);
$descr = str_ireplace("temperature ", "", $descr);
@@ -87,7 +87,7 @@ if ($device['os_group'] == "cisco")
#echo("$index : ".$entry['entSensorScale']."|");
- ### FIXME this stuff is foul
+ /// FIXME this stuff is foul
if ($entry['entSensorScale'] == "nano") { $divisor = "1000000000"; $multiplier = "1"; }
if ($entry['entSensorScale'] == "micro") { $divisor = "1000000"; $multiplier = "1"; }
if ($entry['entSensorScale'] == "milli") { $divisor = "1000"; $multiplier = "1"; }
@@ -98,15 +98,15 @@ if ($device['os_group'] == "cisco")
if (is_numeric($entry['entSensorPrecision']) && $entry['entSensorPrecision'] > "0") { $divisor = $divisor . str_pad('', $entry['entSensorPrecision'], "0"); }
$current = $current * $multiplier / $divisor;
- ### Set thresholds to null
+ /// Set thresholds to null
$limit = NULL; $low_limit = NULL; $warn_limit = NULL; $warn_limit_low = NULL;
- ### Check thresholds for this entry (bit dirty, but it works!)
+ /// Check thresholds for this entry (bit dirty, but it works!)
if (is_array($t_oids[$index]))
{
foreach ($t_oids[$index] as $t_index => $entry)
{
- ### Critical Limit
+ /// Critical Limit
if ($entry['entSensorThresholdSeverity'] == "major" && $entry['entSensorThresholdRelation'] == "greaterOrEqual")
{
$limit = $entry['entSensorThresholdValue'] * $multiplier / $divisor;
@@ -117,7 +117,7 @@ if ($device['os_group'] == "cisco")
$limit_low = $entry['entSensorThresholdValue'] * $multiplier / $divisor;
}
- ### Warning Limit
+ /// Warning Limit
if ($entry['entSensorThresholdSeverity'] == "minor" && $entry['entSensorThresholdRelation'] == "greaterOrEqual")
{
$warn_limit = $entry['entSensorThresholdValue'] * $multiplier / $divisor;
@@ -129,13 +129,13 @@ if ($device['os_group'] == "cisco")
}
}
}
- ### End Threshold code
+ /// End Threshold code
$ok = TRUE;
- if ($current == "-127") { $ok = FALSE; } ## False reading
-# if ($type == "temperature" && $current < 1) { $ok = FALSE; } ## False reading. Temperature <1 :)
- if ($descr == "") { $ok = FALSE; } ## Invalid description. Lots of these on Nexus
+ if ($current == "-127") { $ok = FALSE; } /// False reading
+# if ($type == "temperature" && $current < 1) { $ok = FALSE; } /// False reading. Temperature <1 :)
+ if ($descr == "") { $ok = FALSE; } /// Invalid description. Lots of these on Nexus
if ($ok) {
# echo("\n".$valid['sensor'].", $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $warn_limit, $limit, $current");
diff --git a/includes/discovery/current.inc.php b/includes/discovery/current.inc.php
index ba5e06c52..d7cc94aba 100644
--- a/includes/discovery/current.inc.php
+++ b/includes/discovery/current.inc.php
@@ -1,7 +1,7 @@
Sensor not available
- # FIXME true for MGE as wel as APC?
+ /// FIXME true for MGE as wel as APC?
discover_sensor($valid['sensor'], 'humidity', $device, $oid, $index, $sensorType, $descr, '1', '1', $low_limit, $low_warn_limit, $high_warn_limit, $high_limit , $current);
}
}
diff --git a/includes/discovery/ipmi.inc.php b/includes/discovery/ipmi.inc.php
index 0ab795b63..fcb986280 100644
--- a/includes/discovery/ipmi.inc.php
+++ b/includes/discovery/ipmi.inc.php
@@ -1,6 +1,6 @@
-M mibs/junose/ -m Juniper-UNI-ATM-MIB juniAtmVpStatsEntry
-## JunOSe ATM vps
+/// JunOSe ATM vps
if ($device['os'] == "junose" && $config['enable_ports_junoseatmvp'])
{
echo("JunOSe ATM vps : ");
@@ -23,12 +23,12 @@ if ($device['os'] == "junose" && $config['enable_ports_junoseatmvp'])
{
discover_juniAtmvp($valid_vp, $port_id, $vp_id, NULL);
}
- } ## End Foreach
- } ## End if array
+ } /// End Foreach
+ } /// End if array
unset ($vp_array);
- ## Remove ATM vps which weren't redetected here
+ /// Remove ATM vps which weren't redetected here
$sql = "SELECT * FROM `ports` AS P, `juniAtmVp` AS J WHERE P.`device_id` = '".$device['device_id']."' AND J.port_id = P.port_id";
$query = mysql_query($sql);
diff --git a/includes/discovery/libvirt-vminfo.inc.php b/includes/discovery/libvirt-vminfo.inc.php
index 68157ab5a..d8eb1efa5 100755
--- a/includes/discovery/libvirt-vminfo.inc.php
+++ b/includes/discovery/libvirt-vminfo.inc.php
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/includes/discovery/os/linux.inc.php b/includes/discovery/os/linux.inc.php
index 6aced8c04..ae18f08a8 100755
--- a/includes/discovery/os/linux.inc.php
+++ b/includes/discovery/os/linux.inc.php
@@ -4,11 +4,11 @@ if (!$os)
{
if (preg_match("/^Linux/", $sysDescr)) { $os = "linux"; }
- ## Specific Linux-derivatives
+ /// Specific Linux-derivatives
if ($os == "linux")
{
- ## Check for QNAP Systems TurboNAS
+ /// Check for QNAP Systems TurboNAS
$entPhysicalMfgName = snmp_get($device, "ENTITY-MIB::entPhysicalMfgName.1", "-Osqnv");
if (strstr($sysObjectId, ".1.3.6.1.4.1.5528.100.20.10.2014")) { $os = "netbotz"; }
@@ -17,13 +17,13 @@ if (!$os)
elseif (strpos($entPhysicalMfgName, "QNAP") !== FALSE) { $os = "qnap"; }
else
{
- ## Check for Synology DSM
+ /// Check for Synology DSM
$hrSystemInitialLoadParameters = trim(snmp_get($device, "hrSystemInitialLoadParameters.0", "-Osqnv"));
if (strpos($hrSystemInitialLoadParameters, "syno_hw_version") !== FALSE) { $os = "dsm"; }
else
{
- ## Check for Carel PCOweb
+ /// Check for Carel PCOweb
$roomTemp = trim(snmp_get($device,"roomTemp.0", "-OqvU", "CAREL-ug40cdz-MIB"));
if (is_numeric($roomTemp))
diff --git a/includes/discovery/ports.inc.php b/includes/discovery/ports.inc.php
index c940194dc..ee2bc965c 100755
--- a/includes/discovery/ports.inc.php
+++ b/includes/discovery/ports.inc.php
@@ -13,9 +13,9 @@ if ($debug) { print_r($port_stats); }
/// Build array of ports in the database
-## FIXME -- this stuff is a little messy, looping the array to make an array just seems wrong. :>
-## -- i can make it a function, so that you don't know what it's doing.
-## -- $ports_db = adamasMagicFunction($ports_db); ?
+/// FIXME -- this stuff is a little messy, looping the array to make an array just seems wrong. :>
+/// -- i can make it a function, so that you don't know what it's doing.
+/// -- $ports_db = adamasMagicFunction($ports_db); ?
foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($device['device_id'])) as $port)
{
diff --git a/includes/discovery/power.inc.php b/includes/discovery/power.inc.php
index 22a5079e1..0493c46d5 100644
--- a/includes/discovery/power.inc.php
+++ b/includes/discovery/power.inc.php
@@ -2,7 +2,7 @@
echo("Power: ");
-### Include all discovery modules
+/// Include all discovery modules
$include_dir = "includes/discovery/power";
include("includes/include-dir.inc.php");
diff --git a/includes/discovery/power/ipoman.inc.php b/includes/discovery/power/ipoman.inc.php
index cb8709a25..a145db352 100644
--- a/includes/discovery/power/ipoman.inc.php
+++ b/includes/discovery/power/ipoman.inc.php
@@ -1,11 +1,11 @@
diff --git a/includes/discovery/processors/ios.inc.php b/includes/discovery/processors/ios.inc.php
index c89618600..07b98ef96 100755
--- a/includes/discovery/processors/ios.inc.php
+++ b/includes/discovery/processors/ios.inc.php
@@ -53,7 +53,7 @@ if ($device['os_group'] == "cisco" || $device['os'] == "acsw")
}
}
}
-## End Cisco Processors
+/// End Cisco Processors
unset ($processors_array);
diff --git a/includes/discovery/processors/junos.inc.php b/includes/discovery/processors/junos.inc.php
index 60d5f04fb..363e946e4 100755
--- a/includes/discovery/processors/junos.inc.php
+++ b/includes/discovery/processors/junos.inc.php
@@ -1,6 +1,6 @@
"ssh", 25 => "smtp", 53 => "dns", 80 => "http",
110 => "pop", 143 => "imap");
diff --git a/includes/discovery/storage.inc.php b/includes/discovery/storage.inc.php
index f1a0c63ea..0d3b30af1 100755
--- a/includes/discovery/storage.inc.php
+++ b/includes/discovery/storage.inc.php
@@ -2,12 +2,12 @@
echo("Storage : ");
-### Include all discovery modules
+/// Include all discovery modules
$include_dir = "includes/discovery/storage";
include("includes/include-dir.inc.php");
-### Remove storage which weren't redetected here
+/// Remove storage which weren't redetected here
$sql = "SELECT * FROM `storage` WHERE `device_id` = '".$device['device_id']."'";
$query = mysql_query($sql);
diff --git a/includes/discovery/temperatures.inc.php b/includes/discovery/temperatures.inc.php
index 3e1b215fc..bc92c37b9 100755
--- a/includes/discovery/temperatures.inc.php
+++ b/includes/discovery/temperatures.inc.php
@@ -2,7 +2,7 @@
echo("Temperatures: ");
-### Include all discovery modules
+/// Include all discovery modules
$include_dir = "includes/discovery/temperatures";
include("includes/include-dir.inc.php");
diff --git a/includes/discovery/temperatures/apc.inc.php b/includes/discovery/temperatures/apc.inc.php
index bd7fa220c..f5cc9eef8 100644
--- a/includes/discovery/temperatures/apc.inc.php
+++ b/includes/discovery/temperatures/apc.inc.php
@@ -17,7 +17,7 @@ if ($device['os'] == "apc")
}
# Environmental monitoring on UPSes etc
- # FIXME emConfigProbesTable may also be used? But not filled out on my device...
+ /// FIXME emConfigProbesTable may also be used? But not filled out on my device...
$apc_env_data = snmpwalk_cache_oid($device, "iemConfigProbesTable", array(), "PowerNet-MIB");
$apc_env_data = snmpwalk_cache_oid($device, "iemStatusProbesTable", $apc_env_data, "PowerNet-MIB");
diff --git a/includes/discovery/temperatures/cisco-envmon.inc.php b/includes/discovery/temperatures/cisco-envmon.inc.php
index a9e07fcc3..2c32bb308 100644
--- a/includes/discovery/temperatures/cisco-envmon.inc.php
+++ b/includes/discovery/temperatures/cisco-envmon.inc.php
@@ -1,6 +1,6 @@
$vlans)
#/usr/bin/snmpbulkwalk -v2c -c kglk5g3l454@988 -OQUs -m BRIDGE-MIB -M /opt/observium/mibs/ udp:sw2.ahf:161 dot1dStpPortEntry
#/usr/bin/snmpbulkwalk -v2c -c kglk5g3l454@988 -OQUs -m BRIDGE-MIB -M /opt/observium/mibs/ udp:sw2.ahf:161 dot1dBasePortEntry
- ### FIXME - do this only when vlan type == ethernet?
+ /// FIXME - do this only when vlan type == ethernet?
if (is_numeric($vlan_id) && ($vlan_id <1002 || $vlan_id > 1105)) /// Ignore reserved VLAN IDs
{
if ($device['os_group'] == "cisco" || $device['os'] == "ios") /// This shit only seems to work on IOS
diff --git a/includes/discovery/vlans/cisco-vtp.inc.php b/includes/discovery/vlans/cisco-vtp.inc.php
index c754c0ba9..e98ba77cf 100755
--- a/includes/discovery/vlans/cisco-vtp.inc.php
+++ b/includes/discovery/vlans/cisco-vtp.inc.php
@@ -9,7 +9,7 @@ if ($device['os_group'] == "cisco")
if ($vtpversion == '1' || $vtpversion == '2' || $vtpversion == '3' || $vtpversion == 'one' || $vtpversion == 'two' || $vtpversion == 'three')
{
- ## FIXME - can have multiple VTP domains.
+ /// FIXME - can have multiple VTP domains.
$vtpdomains = snmpwalk_cache_oid($device, "vlanManagementDomains", array(), "CISCO-VTP-MIB");
$vlans = snmpwalk_cache_twopart_oid($device, "vtpVlanEntry", array(), "CISCO-VTP-MIB");
diff --git a/includes/discovery/vmware-vminfo.inc.php b/includes/discovery/vmware-vminfo.inc.php
index 28c396807..62e608d03 100755
--- a/includes/discovery/vmware-vminfo.inc.php
+++ b/includes/discovery/vmware-vminfo.inc.php
@@ -1,6 +1,6 @@
$new), 'devices', 'device_id=?', array($id));
diff --git a/includes/include-dir.inc.php b/includes/include-dir.inc.php
index 98d5ab252..60981343b 100644
--- a/includes/include-dir.inc.php
+++ b/includes/include-dir.inc.php
@@ -1,6 +1,6 @@
'cr',
diff --git a/includes/polling/applications/ntp-client.inc.php b/includes/polling/applications/ntp-client.inc.php
index 3a5bb8a06..651f35400 100644
--- a/includes/polling/applications/ntp-client.inc.php
+++ b/includes/polling/applications/ntp-client.inc.php
@@ -1,6 +1,6 @@
diff --git a/includes/polling/cipsec-tunnels.inc.php b/includes/polling/cipsec-tunnels.inc.php
index daaba56e7..77287c769 100644
--- a/includes/polling/cipsec-tunnels.inc.php
+++ b/includes/polling/cipsec-tunnels.inc.php
@@ -1,6 +1,6 @@
$sensor['sensor_limit_low'] && $sensor_value <= $sensor['sensor_limit_low'])
{
$msg = ucfirst($class) . " Alarm: " . $device['hostname'] . " " . $sensor['sensor_descr'] . " is under threshold: " . $sensor_value . "$unit (< " . $sensor['sensor_limit'] . "$unit)";
@@ -168,10 +168,10 @@ function poll_device($device, $options)
if (!$options['m'])
{
- ## FIXME EVENTLOGGING -- MAKE IT SO WE DO THIS PER-MODULE?
- ### This code cycles through the graphs already known in the database and the ones we've defined as being polled here
- ### If there any don't match, they're added/deleted from the database.
- ### Ideally we should hold graphs for xx days/weeks/polls so that we don't needlessly hide information.
+ /// FIXME EVENTLOGGING -- MAKE IT SO WE DO THIS PER-MODULE?
+ /// This code cycles through the graphs already known in the database and the ones we've defined as being polled here
+ /// If there any don't match, they're added/deleted from the database.
+ /// Ideally we should hold graphs for xx days/weeks/polls so that we don't needlessly hide information.
foreach (dbFetch("SELECT `graph` FROM `device_graphs` WHERE `device_id` = ?", array($device['device_id'])) as $graph)
{
diff --git a/includes/polling/ipSystemStats.inc.php b/includes/polling/ipSystemStats.inc.php
index 505f31a31..9b92760ba 100755
--- a/includes/polling/ipSystemStats.inc.php
+++ b/includes/polling/ipSystemStats.inc.php
@@ -61,7 +61,7 @@ if ($ipSystemStats)
'ipSystemStatsReasmOKs','ipSystemStatsReasmFails','ipSystemStatsInDiscards','ipSystemStatsInDelivers','ipSystemStatsOutRequests','ipSystemStatsOutNoRoutes','ipSystemStatsOutDiscards',
'ipSystemStatsOutFragFails','ipSystemStatsOutFragCreates','ipSystemStatsOutForwDatagrams');
- ### Use HC counters instead if they're available.
+ /// Use HC counters instead if they're available.
if (isset($stats['ipSystemStatsHCInReceives'])) { $stats['ipSystemStatsInReceives'] = $stats['ipSystemStatsHCInReceives']; }
if (isset($stats['ipSystemStatsHCInForwDatagrams'])) { $stats['ipSystemStatsInForwDatagrams'] = $stats['ipSystemStatsHCInForwDatagrams']; }
if (isset($stats['ipSystemStatsHCInDelivers'])) { $stats['ipSystemStatsInDelivers'] = $stats['ipSystemStatsHCInDelivers']; }
@@ -89,7 +89,7 @@ if ($ipSystemStats)
unset($rrdupdate, $rrd_create);
- ## FIXME per-AF?
+ /// FIXME per-AF?
$graphs['ipsystemstats_'.$af] = TRUE;
$graphs['ipsystemstats_'.$af.'_frag'] = TRUE;
diff --git a/includes/polling/ipmi.inc.php b/includes/polling/ipmi.inc.php
index 979407da8..2868916ae 100755
--- a/includes/polling/ipmi.inc.php
+++ b/includes/polling/ipmi.inc.php
@@ -48,7 +48,7 @@ if ($ipmi['host'] = get_dev_attrib($device,'ipmi_hostname'))
rrdtool_update($rrd_file,"N:$sensor");
- ## FIXME warnings in event & mail not done here yet!
+ /// FIXME warnings in event & mail not done here yet!
dbUpdate(array('sensor_current' => $sensor), 'sensors', 'poller_type = ? AND sensor_class = ? AND sensor_id = ?', array('ipmi', $ipmisensors['sensor_class'], $ipmisensors['sensor_id']));
diff --git a/includes/polling/mempools.inc.php b/includes/polling/mempools.inc.php
index 6039cd4ff..85ff945a8 100755
--- a/includes/polling/mempools.inc.php
+++ b/includes/polling/mempools.inc.php
@@ -11,7 +11,7 @@ foreach (dbFetchRows("SELECT * FROM mempools WHERE device_id = ?", array($device
{
include($file);
} else {
- ### Do we need a generic mempool poller?
+ /// Do we need a generic mempool poller?
}
if ($mempool['total'])
diff --git a/includes/polling/mempools/cemp.inc.php b/includes/polling/mempools/cemp.inc.php
index 5a259e120..864ad4b03 100755
--- a/includes/polling/mempools/cemp.inc.php
+++ b/includes/polling/mempools/cemp.inc.php
@@ -2,7 +2,7 @@
$oid = $mempool['mempool_index'];
-# FIXME snmp_get
+/// FIXME snmp_get
$pool_cmd = $config['snmpget'] . " -M ".$config['mibdir']. " -m CISCO-ENHANCED-MEMPOOL-MIB -O Uqnv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'];
$pool_cmd .= " cempMemPoolUsed.$oid cempMemPoolFree.$oid cempMemPoolLargestFree.$oid";
$pool_cmd .= " | cut -f 1 -d ' '";
diff --git a/includes/polling/mempools/cmp.inc.php b/includes/polling/mempools/cmp.inc.php
index 0399eaf66..29f345784 100755
--- a/includes/polling/mempools/cmp.inc.php
+++ b/includes/polling/mempools/cmp.inc.php
@@ -2,7 +2,7 @@
$oid = $mempool['mempool_index'];
-# FIXME snmp_get
+/// FIXME snmp_get
$pool_cmd = $config['snmpget'] . " -M ".$config['mibdir']. " -m CISCO-MEMORY-POOL-MIB -O Uqnv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'];
$pool_cmd .= " ciscoMemoryPoolUsed.$oid ciscoMemoryPoolFree.$oid ciscoMemoryPoolLargestFree.$oid";
$pool_cmd .= " | cut -f 1 -d ' '";
diff --git a/includes/polling/mempools/fortigate.inc.php b/includes/polling/mempools/fortigate.inc.php
index 68957b820..ee4592c27 100644
--- a/includes/polling/mempools/fortigate.inc.php
+++ b/includes/polling/mempools/fortigate.inc.php
@@ -1,7 +1,7 @@
= '3')
$hardware = $ciscomodel;
}
-$poll_device['sysDescr'] = str_replace(", Inc.", "", $poll_device['sysDescr']); ## Make the two formats the same
+$poll_device['sysDescr'] = str_replace(", Inc.", "", $poll_device['sysDescr']); /// Make the two formats the same
$poll_device['sysDescr'] = str_replace("\n", " ", $poll_device['sysDescr']);
list(,,$hardware,,,,,,,$version,,,$features) = explode(" ", $poll_device['sysDescr']);
diff --git a/includes/polling/os/ftos.inc.php b/includes/polling/os/ftos.inc.php
index 02fea2459..39ee22bd8 100644
--- a/includes/polling/os/ftos.inc.php
+++ b/includes/polling/os/ftos.inc.php
@@ -2,7 +2,7 @@
echo("Doing Force10 FTOS ");
-## Stats for S-Series
+/// Stats for S-Series
#F10-S-SERIES-CHASSIS-MIB::chStackUnitModelID.1 = STRING: S25-01-GE-24V
#F10-S-SERIES-CHASSIS-MIB::chStackUnitStatus.1 = INTEGER: ok(1)
@@ -12,7 +12,7 @@ echo("Doing Force10 FTOS ");
#F10-S-SERIES-CHASSIS-MIB::chStackUnitSerialNumber.1 = STRING: DL2E9250002
#F10-S-SERIES-CHASSIS-MIB::chStackUnitUpTime.1 = Timeticks: (262804700) 30 days, 10:00:47.00
-## Stats for C-Series
+/// Stats for C-Series
#F10-C-SERIES-CHASSIS-MIB::chType.0 = INTEGER: c300(7)
#F10-C-SERIES-CHASSIS-MIB::chChassisMode.0 = INTEGER: cseries1(4)
@@ -25,7 +25,7 @@ echo("Doing Force10 FTOS ");
#F10-C-SERIES-CHASSIS-MIB::chDateCode.0 = STRING: "01182007"
#F10-C-SERIES-CHASSIS-MIB::chCountryCode.0 = STRING: "01"
-## Stats for E-Series
+/// Stats for E-Series
#F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.1.1 = STRING: 7.6.1.2
#F10-CHASSIS-MIB::chSysSwRuntimeImgVersion.8.1 = STRING: 7.6.1.2
diff --git a/includes/polling/os/procurve.inc.php b/includes/polling/os/procurve.inc.php
index a0b61e6ba..23c52c058 100755
--- a/includes/polling/os/procurve.inc.php
+++ b/includes/polling/os/procurve.inc.php
@@ -22,7 +22,7 @@ if (preg_match('/^PROCURVE (.*) - (.*)/', $poll_device['sysDescr'], $regexp_resu
$serial = snmp_get($device, ".1.3.6.1.4.1.11.2.36.1.1.2.9.0", "-Oqv", "SEMI-MIB");
$serial = trim(str_replace("\"", "", $serial));
-# FIXME maybe genericise? or do away with it if we ever walk the full dot1qTpFdbTable as we can count ourselves then ;)
+/// FIXME maybe genericise? or do away with it if we ever walk the full dot1qTpFdbTable as we can count ourselves then ;)
$fdb_rrd_file = $config['rrd_dir'] . "/" . $device['hostname'] . "/fdb_count.rrd";
$FdbAddressCount = snmp_get ($device, "hpSwitchFdbAddressCount.0", "-Ovqn", "STATISTICS-MIB");
diff --git a/includes/polling/os/snom.inc.php b/includes/polling/os/snom.inc.php
index 106a05199..fd0e8a8b4 100755
--- a/includes/polling/os/snom.inc.php
+++ b/includes/polling/os/snom.inc.php
@@ -4,7 +4,7 @@ echo("Polling SNOM device...\n");
// Get SNOM specific version string from silly SNOM location. Silly SNOM!
-## FIXME - This needs a good cleanup...
+/// FIXME - This needs a good cleanup...
$cmd = "snmpget -O qv " . snmp_gen_auth($device) . " " . $device['hostname'].":".$device['port'] . " 1.3.6.1.2.1.7526.2.4";
$poll_device['sysDescr'] = `$cmd`;
diff --git a/includes/polling/os/speedtouch.inc.php b/includes/polling/os/speedtouch.inc.php
index 11dd598ac..6d3f33589 100644
--- a/includes/polling/os/speedtouch.inc.php
+++ b/includes/polling/os/speedtouch.inc.php
@@ -6,7 +6,7 @@ $hardware = $poll_device['sysDescr'];
$features = "";
-### Filthy hack to get software version. may not work on anything but 585v7 :)
+/// Filthy hack to get software version. may not work on anything but 585v7 :)
$loop = shell_exec($config['snmpget'] . " -M ".$config['mibdir'] . ' -Ovq '. snmp_gen_auth($device) .' '.$device['hostname'].' ifDescr.101');
diff --git a/includes/polling/os/vmware.inc.php b/includes/polling/os/vmware.inc.php
index 1ce5d1665..7bfb9f4f0 100644
--- a/includes/polling/os/vmware.inc.php
+++ b/includes/polling/os/vmware.inc.php
@@ -80,7 +80,7 @@ foreach ($db_info_list as $db_info)
if ($vm_info[$property] != $db_info[$property])
{
- ## FIXME - this should loop building a query and then run the query after the loop (bad geert!)
+ /// FIXME - this should loop building a query and then run the query after the loop (bad geert!)
dbUpdate(array($property => $vm_info[$property]), 'vminfo', '`id` = ?', array($db_info["id"]));
log_event($db_info["vmwVmDisplayName"] . " (" . preg_replace("/^vmwVm/", "", $property) . ") -> " . $vm_info[$property], $device);
}
diff --git a/includes/polling/os/windows.inc.php b/includes/polling/os/windows.inc.php
index 59e9a2851..5882d61c2 100755
--- a/includes/polling/os/windows.inc.php
+++ b/includes/polling/os/windows.inc.php
@@ -15,7 +15,7 @@ if (strstr($poll_device['sysDescr'], "EM64")) { $hardware = "Intel x64"; }
if (strstr($poll_device['sysDescr'], "AMD64")) { $hardware = "AMD x64"; }
if (strstr($poll_device['sysDescr'], "Intel64")) { $hardware = "Intel x64"; }
-if($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.1") { ## Workstation
+if($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.1") { /// Workstation
if (strstr($poll_device['sysDescr'], "Build Number: 1057")) { $version = "NT 3.51 Workstation"; }
if (strstr($poll_device['sysDescr'], "Build Number: 1381")) { $version = "NT 4.0 Workstation"; }
@@ -28,7 +28,7 @@ if($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.1") { ## Workstation
if (strstr($poll_device['sysDescr'], "Build 7600")) { $version = "7 (NT 6.1)"; }
if (strstr($poll_device['sysDescr'], "Build 7601")) { $version = "7 SP1 (NT 6.1)"; }
-} elseif ($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.2") { ## Server
+} elseif ($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.2") { /// Server
if (strstr($poll_device['sysDescr'], "Build Number: 1057")) { $version = "NT Server 3.51"; }
if (strstr($poll_device['sysDescr'], "Build Number: 1381")) { $version = "NT Server 4.0"; }
@@ -39,7 +39,7 @@ if($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.1") { ## Workstation
if (strstr($poll_device['sysDescr'], "Build 7600")) { $version = "Server 2008 R2 (NT 6.1)"; }
if (strstr($poll_device['sysDescr'], "Build 7601")) { $version = "Server 2008 R2 SP1 (NT 6.1)"; }
-} elseif ($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.3") { ## Datacentre Server
+} elseif ($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.3") { /// Datacentre Server
if (strstr($poll_device['sysDescr'], "Build Number: 1057")) { $version = "NT Datacenter 3.51"; }
if (strstr($poll_device['sysDescr'], "Build Number: 1381")) { $version = "NT Datacenter 4.0"; }
@@ -55,7 +55,7 @@ if($poll_device['sysObjectID'] == ".1.3.6.1.4.1.311.1.1.3.1.1") { ## Workstation
if (strstr($poll_device['sysDescr'], "Uniprocessor")) { $features = "Uniprocessor"; }
if (strstr($poll_device['sysDescr'], "Multiprocessor")) { $features = "Multiprocessor"; }
-### Detect processor type? : I.E. x86 Family 15 Model 2 Stepping 7
+/// Detect processor type? : I.E. x86 Family 15 Model 2 Stepping 7
// Detect Dell hardware via OpenManage SNMP
$hw = snmp_get($device, ".1.3.6.1.4.1.674.10892.1.300.10.1.9.1", "-Oqv", "MIB-Dell-10892");
diff --git a/includes/polling/ospf.inc.php b/includes/polling/ospf.inc.php
index fe18f1fb2..7e2e32d05 100644
--- a/includes/polling/ospf.inc.php
+++ b/includes/polling/ospf.inc.php
@@ -12,17 +12,17 @@ $ospf_oids_db = array('ospfRouterId', 'ospfAdminStat', 'ospfVersionNumber', 'osp
'ospfExternLsaCount', 'ospfExternLsaCksumSum', 'ospfTOSSupport', 'ospfOriginateNewLsas', 'ospfRxNewLsas',
'ospfExtLsdbLimit', 'ospfMulticastExtensions', 'ospfExitOverflowInterval', 'ospfDemandExtensions');
-### Build array of existing entries
+/// Build array of existing entries
foreach (dbFetchRows("SELECT * FROM `ospf_instances` WHERE `device_id` = ?", array($device['device_id'])) as $entry)
{
$ospf_instances_db[$entry['ospf_instance_id']] = $entry;
}
-### Pull data from device
+/// Pull data from device
$ospf_instances_poll = snmpwalk_cache_oid($device, "OSPF-MIB::ospfGeneralGroup", array(), "OSPF-MIB");
foreach ($ospf_instances_poll as $ospf_instance_id => $ospf_entry)
{
- ### If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
+ /// If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
if (!isset($ospf_instances_db[$ospf_instance_id]))
{
dbInsert(array('device_id' => $device['device_id'], 'ospf_instance_id' => $ospf_instance_id), 'ospf_instances');
@@ -41,7 +41,7 @@ if ($debug)
echo("\n");
}
-### Loop array of entries and update
+/// Loop array of entries and update
if (is_array($ospf_instances_db))
{
foreach ($ospf_instances_db as $ospf_instance_db)
@@ -52,7 +52,7 @@ if (is_array($ospf_instances_db))
if ($ospf_instance_db[$oid] != $ospf_instance_poll[$oid])
{ // If data has changed, build a query
$ospf_instance_update[$oid] = $ospf_instance_poll[$oid];
- #log_event("$oid -> ".$this_port[$oid], $device, 'ospf', $port['port_id']); ## FIXME
+ #log_event("$oid -> ".$this_port[$oid], $device, 'ospf', $port['port_id']); /// FIXME
}
}
if ($ospf_instance_update)
@@ -77,18 +77,18 @@ echo(" Areas: ");
$ospf_area_oids = array('ospfAuthType','ospfImportAsExtern','ospfSpfRuns','ospfAreaBdrRtrCount','ospfAsBdrRtrCount','ospfAreaLsaCount','ospfAreaLsaCksumSum','ospfAreaSummary','ospfAreaStatus');
-### Build array of existing entries
+/// Build array of existing entries
foreach (dbFetchRows("SELECT * FROM `ospf_areas` WHERE `device_id` = ?", array($device['device_id'])) as $entry)
{
$ospf_areas_db[$entry['ospfAreaId']] = $entry;
}
-### Pull data from device
+/// Pull data from device
$ospf_areas_poll = snmpwalk_cache_oid($device, "OSPF-MIB::ospfAreaEntry", array(), "OSPF-MIB");
foreach ($ospf_areas_poll as $ospf_area_id => $ospf_area)
{
- ### If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
+ /// If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
if (!isset($ospf_areas_db[$ospf_area_id]))
{
dbInsert(array('device_id' => $device['device_id'], 'ospfAreaId' => $ospf_area_id), 'ospf_areas');
@@ -107,7 +107,7 @@ if ($debug)
echo("\n");
}
-### Loop array of entries and update
+/// Loop array of entries and update
if (is_array($ospf_areas_db))
{
foreach ($ospf_areas_db as $ospf_area_db)
@@ -116,11 +116,11 @@ if (is_array($ospf_areas_db))
{
$ospf_area_poll = $ospf_areas_poll[$ospf_area_db['ospfAreaId']];
foreach ($ospf_area_oids as $oid)
- { ## Loop the OIDs
+ { /// Loop the OIDs
if ($ospf_area_db[$oid] != $ospf_area_poll[$oid])
- { ## If data has changed, build a query
+ { /// If data has changed, build a query
$ospf_area_update[$oid] = $ospf_area_poll[$oid];
- #log_event("$oid -> ".$this_port[$oid], $device, 'interface', $port['port_id']); ## FIXME
+ #log_event("$oid -> ".$this_port[$oid], $device, 'interface', $port['port_id']); /// FIXME
}
}
if ($ospf_area_update)
@@ -150,18 +150,18 @@ echo(" Ports: ");
$ospf_port_oids = array('ospfIfIpAddress','port_id','ospfAddressLessIf','ospfIfAreaId','ospfIfType','ospfIfAdminStat','ospfIfRtrPriority','ospfIfTransitDelay','ospfIfRetransInterval','ospfIfHelloInterval','ospfIfRtrDeadInterval','ospfIfPollInterval','ospfIfState','ospfIfDesignatedRouter','ospfIfBackupDesignatedRouter','ospfIfEvents','ospfIfAuthKey','ospfIfStatus','ospfIfMulticastForwarding','ospfIfDemand','ospfIfAuthType');
-### Build array of existing entries
+/// Build array of existing entries
foreach (dbFetchRows("SELECT * FROM `ospf_ports` WHERE `device_id` = ?", array($device['device_id'])) as $entry)
{
$ospf_ports_db[$entry['ospf_port_id']] = $entry;
}
-### Pull data from device
+/// Pull data from device
$ospf_ports_poll = snmpwalk_cache_oid($device, "OSPF-MIB::ospfIfEntry", array(), "OSPF-MIB");
foreach ($ospf_ports_poll as $ospf_port_id => $ospf_port)
{
- ### If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
+ /// If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
if (!isset($ospf_ports_db[$ospf_port_id]))
{
dbInsert(array('device_id' => $device['device_id'], 'ospf_port_id' => $ospf_port_id), 'ospf_ports');
@@ -179,7 +179,7 @@ if ($debug)
echo("\n");
}
-### Loop array of entries and update
+/// Loop array of entries and update
if (is_array($ospf_ports_db))
{
foreach ($ospf_ports_db as $ospf_port_id => $ospf_port_db)
@@ -200,7 +200,7 @@ if (is_array($ospf_ports_db))
if ($ospf_port_db[$oid] != $ospf_port_poll[$oid])
{ // If data has changed, build a query
$ospf_port_update[$oid] = $ospf_port_poll[$oid];
- #log_event("$oid -> ".$this_port[$oid], $device, 'ospf', $port['port_id']); ## FIXME
+ #log_event("$oid -> ".$this_port[$oid], $device, 'ospf', $port['port_id']); /// FIXME
}
}
if ($ospf_port_update)
@@ -240,18 +240,18 @@ $ospf_nbr_oids_db = array('ospfNbrIpAddr', 'ospfNbrAddressLessIndex', 'ospfNbrR
$ospf_nbr_oids_rrd = array();
$ospf_nbr_oids = array_merge($ospf_nbr_oids_db, $ospf_nbr_oids_rrd);
-### Build array of existing entries
+/// Build array of existing entries
foreach (dbFetchRows("SELECT * FROM `ospf_nbrs` WHERE `device_id` = ?", array($device['device_id'])) as $nbr_entry)
{
$ospf_nbrs_db[$nbr_entry['ospf_nbr_id']] = $nbr_entry;
}
-### Pull data from device
+/// Pull data from device
$ospf_nbrs_poll = snmpwalk_cache_oid($device, "OSPF-MIB::ospfNbrEntry", array(), "OSPF-MIB");
foreach ($ospf_nbrs_poll as $ospf_nbr_id => $ospf_nbr)
{
- ### If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
+ /// If the entry doesn't already exist in the prebuilt array, insert into the database and put into the array
if (!isset($ospf_nbrs_db[$ospf_nbr_id]))
{
dbInsert(array('device_id' => $device['device_id'], 'ospf_nbr_id' => $ospf_nbr_id), 'ospf_nbrs');
@@ -270,7 +270,7 @@ if ($debug)
echo("\n");
}
-### Loop array of entries and update
+/// Loop array of entries and update
if (is_array($ospf_nbrs_db))
{
foreach ($ospf_nbrs_db as $ospf_nbr_id => $ospf_nbr_db)
@@ -296,7 +296,7 @@ if (is_array($ospf_nbrs_db))
if ($ospf_nbr_db[$oid] != $ospf_nbr_poll[$oid])
{ // If data has changed, build a query
$ospf_nbr_update[$oid] = $ospf_nbr_poll[$oid];
- #log_event("$oid -> ".$this_nbr[$oid], $device, 'ospf', $nbr['port_id']); ## FIXME
+ #log_event("$oid -> ".$this_nbr[$oid], $device, 'ospf', $nbr['port_id']); /// FIXME
}
}
if ($ospf_nbr_update)
@@ -318,7 +318,7 @@ if (is_array($ospf_nbrs_db))
}
}
-## Create device-wide statistics RRD
+/// Create device-wide statistics RRD
$filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("ospf-statistics.rrd");
diff --git a/includes/polling/port-adsl.inc.php b/includes/polling/port-adsl.inc.php
index b054f186b..53f7df28e 100755
--- a/includes/polling/port-adsl.inc.php
+++ b/includes/polling/port-adsl.inc.php
@@ -1,7 +1,7 @@
array('NOW()'));
foreach ($adsl_db_oids as $oid)
{
- $data = str_replace("\"", "", $this_port[$oid]); ## FIXME - do we need this?
+ $data = str_replace("\"", "", $this_port[$oid]); /// FIXME - do we need this?
$port['adsl_update'][$oid] = $data;
}
dbUpdate($port['adsl_update'], 'ports_adsl', '`port_id` = ?', array($port['port_id']));
@@ -107,7 +107,7 @@ if (isset($port_stats[$port['ifIndex']]['adslLineCoding']))
{
$oid = "adsl".$oid;
$data = str_replace("\"", "", $this_port[$oid]);
- ## Set data to be "unknown" if it's garbled, unexistant or zero
+ /// Set data to be "unknown" if it's garbled, unexistant or zero
if (!is_numeric($data)) { $data = "U"; }
$rrdupdate .= ":$data";
}
diff --git a/includes/polling/port-poe.inc.php b/includes/polling/port-poe.inc.php
index 80ccc83c5..d95d920a3 100755
--- a/includes/polling/port-poe.inc.php
+++ b/includes/polling/port-poe.inc.php
@@ -24,7 +24,7 @@ if ($port_stats[$port['ifIndex']] && $port['ifType'] == "ethernetCsmacd"
{
$rrd_create .= $config['rrd_rra'];
- # FIXME CISCOSPECIFIC
+ /// FIXME CISCOSPECIFIC
$rrd_create .= " DS:PortPwrAllocated:GAUGE:600:0:U";
$rrd_create .= " DS:PortPwrAvailable:GAUGE:600:0:U";
$rrd_create .= " DS:PortConsumption:DERIVE:600:0:U";
diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php
index 79cbe8caf..d14a63d7b 100755
--- a/includes/polling/ports.inc.php
+++ b/includes/polling/ports.inc.php
@@ -1,6 +1,6 @@
"0")
$port_stats = snmpwalk_cache_oid($device, ".1.3.6.1.2.1.10.94.1.1.7.1.7", $port_stats, "ADSL-LINE-MIB");
}
-### FIXME This probably needs re-enabled. We need to clear these things when they get unset, too.
+/// FIXME This probably needs re-enabled. We need to clear these things when they get unset, too.
#foreach ($etherlike_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "EtherLike-MIB"); }
#foreach ($cisco_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "OLD-CISCO-INTERFACES-MIB"); }
#foreach ($pagp_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "CISCO-PAGP-MIB"); }
@@ -78,8 +78,8 @@ if ($device['os_group'] == "cisco")
foreach ($pagp_oids as $oid) { $port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, "CISCO-PAGP-MIB"); }
$data_oids[] = "portName";
- ### Grab data to put ports into vlans or make them trunks
- ### FIXME we probably shouldn't be doing this from the VTP MIB, right?
+ /// Grab data to put ports into vlans or make them trunks
+ /// FIXME we probably shouldn't be doing this from the VTP MIB, right?
$port_stats = snmpwalk_cache_oid($device, "vmVlan", $port_stats, "CISCO-VLAN-MEMBERSHIP-MIB");
$port_stats = snmpwalk_cache_oid($device, "vlanTrunkPortEncapsulationOperType", $port_stats, "CISCO-VTP-MIB");
$port_stats = snmpwalk_cache_oid($device, "vlanTrunkPortNativeVlan", $port_stats, "CISCO-VTP-MIB");
@@ -114,20 +114,20 @@ if ($device['os_group'] == "cisco")
$polled = time();
-### End Building SNMP Cache Array
+/// End Building SNMP Cache Array
if ($debug) { print_r($port_stats); }
-### Build array of ports in the database
+/// Build array of ports in the database
-## FIXME -- this stuff is a little messy, looping the array to make an array just seems wrong. :>
-## -- i can make it a function, so that you don't know what it's doing.
-## -- $ports = adamasMagicFunction($ports_db); ?
+/// FIXME -- this stuff is a little messy, looping the array to make an array just seems wrong. :>
+/// -- i can make it a function, so that you don't know what it's doing.
+/// -- $ports = adamasMagicFunction($ports_db); ?
$ports_db = dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($device['device_id']));
foreach ($ports_db as $port) { $ports[$port['ifIndex']] = $port; }
-### New interface detection
+/// New interface detection
foreach ($port_stats as $ifIndex => $port)
{
if (is_port_valid($port, $device))
@@ -151,15 +151,15 @@ foreach ($port_stats as $ifIndex => $port)
}
}
}
-### End New interface detection
+/// End New interface detection
echo("\n");
-### Loop ports in the DB and update where necessary
+/// Loop ports in the DB and update where necessary
foreach ($ports as $port)
{
echo("Port " . $port['ifDescr'] . "(".$port['ifIndex'].") ");
if ($port_stats[$port['ifIndex']] && $port['disabled'] != "1")
- { ### Check to make sure Port data is cached.
+ { /// Check to make sure Port data is cached.
$this_port = &$port_stats[$port['ifIndex']];
if ($device['os'] == "vmware" && preg_match("/Device ([a-z0-9]+) at .*/", $this_port['ifDescr'], $matches)) { $this_port['ifDescr'] = $matches[1]; }
@@ -187,7 +187,7 @@ foreach ($ports as $port)
$memcache->set('port-'.$port['port_id'].'-poll_period', $polled_period);
}
- ### Copy ifHC[In|Out]Octets values to non-HC if they exist
+ /// Copy ifHC[In|Out]Octets values to non-HC if they exist
if ($this_port['ifHCInOctets'] > 0 && is_numeric($this_port['ifHCInOctets']) && $this_port['ifHCOutOctets'] > 0 && is_numeric($this_port['ifHCOutOctets']))
{
echo("HC ");
@@ -195,7 +195,7 @@ foreach ($ports as $port)
$this_port['ifOutOctets'] = $this_port['ifHCOutOctets'];
}
- ### rewrite the ifPhysAddress
+ /// rewrite the ifPhysAddress
if (strpos($this_port['ifPhysAddress'], ":"))
{
list($a_a, $a_b, $a_c, $a_d, $a_e, $a_f) = explode(":", $this_port['ifPhysAddress']);
@@ -211,21 +211,21 @@ foreach ($ports as $port)
$this_port['ifOutMulticastPkts'] = $this_port['ifHCOutMulticastPkts'];
}
- ### Overwrite ifSpeed with ifHighSpeed if it's over 10G
+ /// Overwrite ifSpeed with ifHighSpeed if it's over 10G
if (is_numeric($this_port['ifHighSpeed']) && $this_port['ifSpeed'] > "1000000000")
{
echo("HighSpeed ");
$this_port['ifSpeed'] = $this_port['ifHighSpeed'] * 1000000;
}
- ### Overwrite ifDuplex with dot3StatsDuplexStatus if it exists
+ /// Overwrite ifDuplex with dot3StatsDuplexStatus if it exists
if (isset($this_port['dot3StatsDuplexStatus']))
{
echo("dot3Duplex ");
$this_port['ifDuplex'] = $this_port['dot3StatsDuplexStatus'];
}
- ### Set VLAN and Trunk from Cisco
+ /// Set VLAN and Trunk from Cisco
if (isset($this_port['vlanTrunkPortEncapsulationOperType']) && $this_port['vlanTrunkPortEncapsulationOperType'] != "notApplicable")
{
$this_port['ifTrunk'] = $this_port['vlanTrunkPortEncapsulationOperType'];
@@ -237,16 +237,16 @@ foreach ($ports as $port)
$this_port['ifVlan'] = $this_port['vmVlan'];
}
- ### Set VLAN and Trunk from Q-BRIDGE-MIB
+ /// Set VLAN and Trunk from Q-BRIDGE-MIB
if (!isset($this_port['ifVlan']) && isset($this_port['dot1qPvid']))
{
$this_port['ifVlan'] = $this_port['dot1qPvid'];
}
- # FIXME use $q_bridge_mib[$this_port['ifIndex']] to see if it is a trunk (>1 array count)
+ /// FIXME use $q_bridge_mib[$this_port['ifIndex']] to see if it is a trunk (>1 array count)
echo("VLAN == ".$this_port['ifVlan']);
- ### Update IF-MIB data
+ /// Update IF-MIB data
foreach ($data_oids as $oid)
{
if ($port[$oid] != $this_port[$oid] && !isset($this_port[$oid]))
@@ -261,7 +261,7 @@ foreach ($ports as $port)
}
}
- ### Parse description (usually ifAlias) if config option set
+ /// Parse description (usually ifAlias) if config option set
if (isset($config['port_descr_parser']) && is_file($config['install_dir'] . "/" . $config['port_descr_parser']))
{
$port_attribs = array('type','descr','circuit','speed','notes');
@@ -278,9 +278,9 @@ foreach ($ports as $port)
}
}
}
- ### End parse ifAlias
+ /// End parse ifAlias
- ### Update IF-MIB metrics
+ /// Update IF-MIB metrics
foreach ($stat_oids_db as $oid)
{
@@ -342,7 +342,7 @@ foreach ($ports as $port)
echo('bytes('.formatStorage($port['stats']['ifInOctets_diff']).'/'.formatStorage($port['stats']['ifOutOctets_diff']).')');
echo('pkts('.format_si($port['stats']['ifInUcastPkts_rate']).'pps/'.format_si($port['stats']['ifOutUcastPkts_rate']).'pps)');
- ### Port utilisation % threshold alerting. ## FIXME allow setting threshold per-port. probably 90% of ports we don't care about.
+ /// Port utilisation % threshold alerting. /// FIXME allow setting threshold per-port. probably 90% of ports we don't care about.
if ($config['alerts']['port_util_alert'])
{
// Check for port saturation of $config['alerts']['port_util_perc'] or higher. Alert if we see this.
@@ -356,7 +356,7 @@ foreach ($ports as $port)
}
}
- ### Update RRDs
+ /// Update RRDs
$rrdfile = $host_rrd . "/port-" . safename($port['ifIndex'] . ".rrd");
if (!is_file($rrdfile))
{
@@ -383,44 +383,44 @@ foreach ($ports as $port)
$this_port['ifInBroadcastPkts'], $this_port['ifOutBroadcastPkts'], $this_port['ifInMulticastPkts'], $this_port['ifOutMulticastPkts']);
rrdtool_update("$rrdfile", $this_port['rrd_update']);
- ### End Update IF-MIB
+ /// End Update IF-MIB
- ### Update PAgP
+ /// Update PAgP
if ($this_port['pagpOperationMode'] || $port['pagpOperationMode'])
{
foreach ($pagp_oids as $oid)
- { ### Loop the OIDs
+ { /// Loop the OIDs
if ($this_port[$oid] != $port[$oid])
- { ### If data has changed, build a query
+ { /// If data has changed, build a query
$port['update'][$oid] = $this_port[$oid];
echo("PAgP ");
log_event("$oid -> ".$this_port[$oid], $device, 'interface', $port['port_id']);
}
}
}
- ### End Update PAgP
+ /// End Update PAgP
- ### Do EtherLike-MIB
+ /// Do EtherLike-MIB
if ($config['enable_ports_etherlike']) { include("port-etherlike.inc.php"); }
- ### Do ADSL MIB
+ /// Do ADSL MIB
if ($config['enable_ports_adsl']) { include("port-adsl.inc.php"); }
- ### Do PoE MIBs
+ /// Do PoE MIBs
if ($config['enable_ports_poe']) { include("port-poe.inc.php"); }
- ### Do Alcatel Detailed Stats
+ /// Do Alcatel Detailed Stats
if ($device['os'] == "aos") { include("port-alcatel.inc.php"); }
- ### Update Database
+ /// Update Database
if (count($port['update']))
{
$updated = dbUpdate($port['update'], 'ports', '`port_id` = ?', array($port['port_id']));
if ($debug) { echo("$updated updated"); }
}
- ### End Update Database
+ /// End Update Database
- ### Send alerts for interface flaps.
+ /// Send alerts for interface flaps.
if ($config['alerts']['port']['ifdown'] && ($port['ifOperStatus'] != $this_port['ifOperStatus']) && $port['ignore'] == 0)
{
if ($this_port['ifAlias'])
@@ -442,7 +442,7 @@ foreach ($ports as $port)
}
elseif ($port['disabled'] != "1")
{
- echo("Port Deleted"); ### Port missing from SNMP cache.
+ echo("Port Deleted"); /// Port missing from SNMP cache.
if ($port['deleted'] != "1")
{
dbUpdate(array('deleted' => '1'), 'ports', '`device_id` = ? AND `ifIndex` = ?', array($device['device_id'], $port['ifIndex']));
@@ -453,11 +453,11 @@ foreach ($ports as $port)
echo("\n");
- ### Clear Per-Port Variables Here
+ /// Clear Per-Port Variables Here
unset($this_port);
}
-### Clear Variables Here
+/// Clear Variables Here
unset($port_stats);
?>
diff --git a/includes/polling/processors/ucd-old.inc.php b/includes/polling/processors/ucd-old.inc.php
index c7cc9fe1c..5e8d12cfb 100644
--- a/includes/polling/processors/ucd-old.inc.php
+++ b/includes/polling/processors/ucd-old.inc.php
@@ -1,6 +1,6 @@
'A',
'frequency' => 'Hz',
diff --git a/includes/polling/storage-hrstorage.inc.php b/includes/polling/storage-hrstorage.inc.php
index 9ee9abf5e..a6b8774ac 100755
--- a/includes/polling/storage-hrstorage.inc.php
+++ b/includes/polling/storage-hrstorage.inc.php
@@ -1,6 +1,6 @@
$pkg)
{
dbDelete('packages', "`pkg_id` = ?", array($id));
diff --git a/includes/polling/wifi.inc.php b/includes/polling/wifi.inc.php
index 0eef95920..12f5e8954 100644
--- a/includes/polling/wifi.inc.php
+++ b/includes/polling/wifi.inc.php
@@ -4,7 +4,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
{
echo("Wireless: ");
- ##### GENERIC FRAMEWORK, FILLING VARIABLES
+ ///# GENERIC FRAMEWORK, FILLING VARIABLES
if ($device['os'] == 'airport')
{
echo("Checking Airport Wireless clients... ");
@@ -13,7 +13,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
echo($wificlients1 . " clients\n");
- # FIXME Also interesting to poll? dhcpNumber.0 for number of active dhcp leases
+ /// FIXME Also interesting to poll? dhcpNumber.0 for number of active dhcp leases
}
if ($device['os'] == 'ios' and substr($device['hardware'],0,4) == 'AIR-')
@@ -55,7 +55,7 @@ if ($device['type'] == 'network' || $device['type'] == 'firewall')
echo(($wificlients1 +0) . " clients on wireless connector, ");
}
- ##### RRD Filling Code
+ ///# RRD Filling Code
if (isset($wificlients1) && $wificlients1 != "")
{
$wificlientsrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("wificlients-radio1.rrd");
diff --git a/includes/port-descr-parser.inc.php b/includes/port-descr-parser.inc.php
index f72f01771..6a97f8aa8 100644
--- a/includes/port-descr-parser.inc.php
+++ b/includes/port-descr-parser.inc.php
@@ -1,7 +1,7 @@
+ * This file is part of Observium.
+ *
+ * @package observium
+ * @subpackage rrdtool
+ * @author Adam Armstrong
+ * @copyright (C) 2006 - 2012 Adam Armstrong
*
*/
@@ -192,6 +195,14 @@ function rrdtool_create($filename, $options)
return shell_exec($command);
}
+/**
+ * Updates an rrd database at $filename using $options
+ * Where $options is an array, each entry which is not a number is replaced with "U"
+ *
+ * @param string filename
+ * @param array options
+ */
+
function rrdtool_update($filename, $options)
{
/// Do some sanitisation on the data if passed as an array.
@@ -238,7 +249,7 @@ function rrdtool_escape($string, $maxlength = NULL)
$result = str_replace(':','\:',$string);
$result = str_replace('%','%%',$result);
- # FIXME: should maybe also probably escape these? # \ + ? [ ^ ] ( $ ) '
+ /// FIXME: should maybe also probably escape these? # \ + ? [ ^ ] ( $ ) '
if ($maxlength != NULL)
{
diff --git a/includes/snom-graphing.php b/includes/snom-graphing.php
index 981a52fea..246753395 100644
--- a/includes/snom-graphing.php
+++ b/includes/snom-graphing.php
@@ -1,6 +1,6 @@
- ##
- ########################################################################################
+ ///////////////////////////////////////////////////////////////////////////////////////
+ ///
+ /// A small script to grab the MailScanner statistics from a MailScanner server
+ /// Needed commands: php, MailScanner, WatchMailLog, perl
+ ///
+ /// Install:
+ /// Add the WatchMailLog Daemon to the rc.local so its start on server boot
+ /// Run the WatchMailLog Daemon to start grabbing statistics from log files
+ /// Add the following to your snmpd.conf file:
+ /// extend mailwatch /opt/observium/scripts/mailwatch.php
+ ///
+ /// Version 1.0 By:
+ /// All In One - Dennis de Houx
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
- #### START SETTINGS ####
+ /// START SETTINGS ///
$mailstats = "/opt/observium/scripts/watchmaillog/watchmaillog_counters";
- #### END SETTINGS ####
+ /// END SETTINGS ///
- ##
- ## DO NOT EDIT BENETH THIS LINE
- ##
- ########################################################################################
+ ///
+ /// DO NOT EDIT BENETH THIS LINE
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
function doSNMPv2($vars) {
$stats = array();
diff --git a/scripts/ntp-client.php b/scripts/ntp-client.php
index cdebf640f..9693af5a6 100644
--- a/scripts/ntp-client.php
+++ b/scripts/ntp-client.php
@@ -1,35 +1,35 @@
#!/usr/bin/env php
- ##
- ########################################################################################
+ ///////////////////////////////////////////////////////////////////////////////////////
+ ///
+ /// A small script to grab the NTP Client statistics from a NTPD server
+ /// Needed commands: php, ntpd, ntpq
+ ///
+ /// Install:
+ /// Add the following to your snmpd.conf file:
+ /// extend ntpclient /opt/observium/scripts/ntp-client.php
+ ///
+ /// Version 1.1 By:
+ /// All In One - Dennis de Houx
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
- #### START SETTINGS ####
+ /// START SETTINGS ///
$ntpq = "/usr/sbin/ntpq";
# Change this to true if you have clk_jitter, sys_jitter in the ntpq -c rv output
$newstats_style = false;
- #### END SETTINGS ####
+ /// END SETTINGS ///
- ##
- ## DO NOT EDIT BENETH THIS LINE
- ##
- ########################################################################################
+ ///
+ /// DO NOT EDIT BENETH THIS LINE
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
$cmd = shell_exec($ntpq." -c rv | grep '^offset'");
if ($newstats_style) {
diff --git a/scripts/ntpd-server.php b/scripts/ntpd-server.php
index efcafd7c4..b7fb551fb 100644
--- a/scripts/ntpd-server.php
+++ b/scripts/ntpd-server.php
@@ -1,22 +1,22 @@
#!/usr/bin/env php
- ##
- ########################################################################################
+ ///////////////////////////////////////////////////////////////////////////////////////
+ ///
+ /// A small script to grab the NTPD Server statistics from a NTPD server
+ /// Needed commands: php, ntpd, ntpq, ntpdc
+ ///
+ /// Install:
+ /// Add the following to your snmpd.conf file:
+ /// extend ntpdserver /opt/observium/scripts/ntpd-server.php
+ ///
+ /// Version 1.1 By:
+ /// All In One - Dennis de Houx
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
- #### START SETTINGS ####
+ /// START SETTINGS ///
$ntpq = "/usr/sbin/ntpq";
$ntpdc = "/usr/sbin/ntpdc";
@@ -24,13 +24,13 @@
# Change this to true if you have clk_jitter, sys_jitter in the ntpq -c rv output
$newstats_style = false;
- #### END SETTINGS ####
+ /// END SETTINGS ///
- ##
- ## DO NOT EDIT BENETH THIS LINE
- ##
- ########################################################################################
+ ///
+ /// DO NOT EDIT BENETH THIS LINE
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
$cmd = shell_exec($ntpq." -c rv");
$cmd2 = shell_exec($ntpdc." -c iostats");
diff --git a/scripts/powerdns.php b/scripts/powerdns.php
index a71ae7998..d09b85998 100755
--- a/scripts/powerdns.php
+++ b/scripts/powerdns.php
@@ -1,32 +1,32 @@
#!/usr/bin/env php
-##
-########################################################################################
+///////////////////////////////////////////////////////////////////////////////////////
+///
+/// A small script to grab the DNS statistics from a PowerDNS server
+/// Needed commands: php, pdns_control
+///
+/// Install:
+/// Add the following to your snmpd.conf file:
+/// extend powerdns /opt/observium/scripts/powerdns.php
+///
+/// Version 1.0 By:
+/// All In One - Dennis de Houx
+///
+///////////////////////////////////////////////////////////////////////////////////////
-#### START SETTINGS ####
+/// START SETTINGS ///
$pdnscontrol = "/usr/bin/pdns_control";
-#### END SETTINGS ####
+/// END SETTINGS ///
-##
-## DO NOT EDIT BENETH THIS LINE
-##
-########################################################################################
+///
+/// DO NOT EDIT BENETH THIS LINE
+///
+///////////////////////////////////////////////////////////////////////////////////////
$cmd = shell_exec($pdnscontrol." show \*");
$vars = array();
diff --git a/scripts/shoutcast.php b/scripts/shoutcast.php
index 7af76b16d..1c5e7422e 100644
--- a/scripts/shoutcast.php
+++ b/scripts/shoutcast.php
@@ -1,36 +1,36 @@
#!/usr/bin/env php
- ##
- ########################################################################################
+ ///////////////////////////////////////////////////////////////////////////////////////
+ ///
+ /// A small script to grab the realtime statistics from a ShoutCast server
+ /// Needed commands: php
+ ///
+ /// Install:
+ /// Edit the shoutcast.conf file
+ /// Add a crontab (every 5 min) for:
+ /// /opt/observium/scripts/shoutcast.php makeCache
+ /// Add the following to your snmpd.conf file:
+ /// extend shoutcast /opt/observium/scripts/shoutcast.php
+ ///
+ /// Version 1.1 By:
+ /// All In One - Dennis de Houx
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
- #### START SETTINGS ####
+ /// START SETTINGS ///
$config = "/opt/observium/scripts/shoutcast.conf";
$cache = "/opt/observium/scripts/shoutcast.cache";
- #### END SETTINGS ####
+ /// END SETTINGS ///
- ##
- ## DO NOT EDIT BENETH THIS LINE
- ##
- ########################################################################################
+ ///
+ /// DO NOT EDIT BENETH THIS LINE
+ ///
+ ///////////////////////////////////////////////////////////////////////////////////////
/* Do NOT run this script through a web browser */
if (!isset($_SERVER["argv"][0]) || isset($_SERVER['REQUEST_METHOD']) || isset($_SERVER['REMOTE_ADDR'])) {
diff --git a/scripts/update-sql.php b/scripts/update-sql.php
index eae7123c1..857d545b8 100755
--- a/scripts/update-sql.php
+++ b/scripts/update-sql.php
@@ -15,7 +15,7 @@ if ($fd = @fopen($argv[1],'r'))
foreach (explode("\n", $data) as $line)
{
$update = mysql_query($line);
- # FIXME check query success?
+ /// FIXME check query success?
echo("$line \n");
}
}