diff --git a/html/pages/adduser.inc.php b/html/pages/adduser.inc.php
index 31f292b8f..64af94aa9 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 f116755f0..8563518b2 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 0ba4d8f6e..b63038cf3 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 3a8f6d99e..1e60a8ac7 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 c3c82180a..4b3e151aa 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 bf5d9f686..ae54227d9 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 573f392cc..7f056fc86 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 351691b19..c68f9539d 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 d3947acf2..c2dd8df92 100644
--- a/html/pages/device.inc.php
+++ b/html/pages/device.inc.php
@@ -184,15 +184,15 @@ 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
+ if ($device['os'] == "netscaler") // Netscaler
{
$device_loadbalancer_count['netscaler_vsvr'] = dbFetchCell("SELECT COUNT(*) FROM `netscaler_vservers` WHERE `device_id` = ?", array($device['device_id']));
if ($device_loadbalancer_count['netscaler_vsvr']) { $loadbalancer_tabs[] = 'netscaler_vsvr'; }
}
- if ($device['os'] == "acsw") /// Cisco ACE
+ if ($device['os'] == "acsw") // Cisco ACE
{
$device_loadbalancer_count['loadbalancer_vservers'] = dbFetchCell("SELECT COUNT(*) FROM `loadbalancer_vservers` WHERE `device_id` = ?", array($device['device_id']));
if ($device_loadbalancer_count['loadbalancer_vservers']) { $loadbalancer_tabs[] = 'loadbalancer_vservers'; }
@@ -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/alerts.inc.php b/html/pages/device/alerts.inc.php
index 3885ae8ea..13c32ef1a 100644
--- a/html/pages/device/alerts.inc.php
+++ b/html/pages/device/alerts.inc.php
@@ -44,7 +44,7 @@ function get_entity_list($type, $subtype = "*", $device_id = "*", $entry)
foreach ($entities_db as $entity_db)
{
- /// Is this entity marked as deleted?
+ // Is this entity marked as deleted?
if ($entity_db['deleted'] != "1")
{
$entities[] = $entity_db['id'];
@@ -68,7 +68,7 @@ foreach ($glo_conditions as $type => $subtypes)
echo(' ');
echo('');
- /// Get which entities match this checker
+ // Get which entities match this checker
$entities = get_entity_list($type, $subtype, $device['device_id'], $entry['entity']);
if (!empty($entities))
diff --git a/html/pages/device/graphs.inc.php b/html/pages/device/graphs.inc.php
index e90409f97..9e4b785bc 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 37adc1213..cf6538965 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 97b339ff7..26e96923c 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 59126dfbd..a061530da 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 caf493beb..896511bc5 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 4f989040e..7c5cbf15a 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 1e64312cc..3c0f2e072 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
");
@@ -142,7 +142,7 @@ if ($config['enable_syslog'])
}
echo("");
- echo(""); /// Close Syslog Div
+ echo(""); // Close Syslog Div
}
echo("");
diff --git a/html/pages/front/example2.php b/html/pages/front/example2.php
index 60fd45adc..df0c6792b 100644
--- a/html/pages/front/example2.php
+++ b/html/pages/front/example2.php
@@ -106,7 +106,7 @@ echo("
");
-/// this stuff can be customised to show whatever you want....
+// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5')
{
@@ -169,7 +169,7 @@ if ($_SESSION['userlevel'] >= '5')
}
-/// END VOSTRON
+// END VOSTRON
?>
diff --git a/html/pages/front/globe.php b/html/pages/front/globe.php
index 91e94777c..0ecf44333 100644
--- a/html/pages/front/globe.php
+++ b/html/pages/front/globe.php
@@ -95,7 +95,7 @@ $sql = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id
$sql = mysql_query("SELECT * FROM `ports` AS I, `devices` AS D, devices_perms AS P WHERE D.device_id = P.device_id AND P.user_id = '" . $_SESSION['user_id'] . "' AND I.device_id = D.device_id AND ifOperStatus = 'down' AND ifAdminStatus = 'up' AND D.ignore = '0' AND I.ignore = '0'");
}
-/// These things need to become more generic, and more manageable across different frontpages... rewrite inc :>
+// These things need to become more generic, and more manageable across different frontpages... rewrite inc :>
if ($config['warn']['ifdown'])
{
@@ -164,7 +164,7 @@ if (filter_var($config['uptime_warning'], FILTER_VALIDATE_FLOAT) !== FALSE && $c
if ($config['enable_syslog'])
{
- /// Open Syslog Div
+ // Open Syslog Div
echo("
Recent Syslog Messages
");
@@ -180,11 +180,11 @@ if ($config['enable_syslog'])
}
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/front/jt.php b/html/pages/front/jt.php
index 0ea0cae0a..390235597 100644
--- a/html/pages/front/jt.php
+++ b/html/pages/front/jt.php
@@ -111,7 +111,7 @@ echo("
");
-/// this stuff can be customised to show whatever you want....
+// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5')
{
diff --git a/html/pages/front/traffic.php b/html/pages/front/traffic.php
index f420b00e3..d94996ec3 100644
--- a/html/pages/front/traffic.php
+++ b/html/pages/front/traffic.php
@@ -110,7 +110,7 @@ echo("
");
-/// this stuff can be customised to show whatever you want....
+// this stuff can be customised to show whatever you want....
if ($_SESSION['userlevel'] >= '5')
{
diff --git a/html/pages/graphs.inc.php b/html/pages/graphs.inc.php
index a64eec6ef..a75247ead 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 3b38b8e5b..7d9ecca3d 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 2e76c202e..b3dc935f1 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 17a04078c..90b7743ba 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 485dae46d..b3a7f09b0 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 a4b9a2729..f60312704 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 f068d0e55..3c811c531 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 c0a0e2c52..d5dfe887c 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 ded3bde41..1cc7a09f7 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 c175cbcc4..67fbc2097 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -20,12 +20,12 @@
*/
///
-/// 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 f1cfbae3c..c2e2f63d1 100644
--- a/includes/definitions.inc.php
+++ b/includes/definitions.inc.php
@@ -33,7 +33,7 @@ $config['os'][$os]['over'][1]['text'] = "Processor Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
-/// Linux-based OSes here please.
+// Linux-based OSes here please.
$os = "linux";
$config['os'][$os]['type'] = "server";
@@ -77,7 +77,7 @@ $config['os'][$os]['over'][1]['text'] = "Processor Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
-/// Other Unix-based OSes here please.
+// Other Unix-based OSes here please.
$os = "freebsd";
$config['os'][$os]['type'] = "server";
@@ -135,7 +135,7 @@ $config['os'][$os]['type'] = "server";
$config['os'][$os]['group'] = "unix";
$config['os'][$os]['text'] = "OpenIndiana";
-/// Alcatel
+// Alcatel
$os = "aos";
$config['os'][$os]['group'] = "aos";
@@ -156,7 +156,7 @@ $config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
$config['os'][$os]['icon'] = "alcatellucent";
-/// Cisco OSes
+// Cisco OSes
$os = "ios";
$config['os'][$os]['group'] = "cisco";
@@ -283,7 +283,7 @@ $config['os'][$os]['over'][1]['text'] = "CPU Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
-/// Cisco Small Business
+// Cisco Small Business
$os = "ciscosb";
$config['os'][$os]['group'] = "cisco";
@@ -294,7 +294,7 @@ $config['os'][$os]['icon'] = "linksys";
$config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
-/// Huawei
+// Huawei
$os = "vrp";
$config['os'][$os]['group'] = "vrp";
@@ -302,7 +302,7 @@ $config['os'][$os]['text'] = "Huawei VRP";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "huawei";
-/// ZTE
+// ZTE
$os = "zxr10";
$config['os'][$os]['group'] = "zxr10";
@@ -310,7 +310,7 @@ $config['os'][$os]['text'] = "ZTE ZXR10";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "zte";
-/// Supermicro Switch
+// Supermicro Switch
$os = "supermicro-switch";
$config['os'][$os]['group'] = "supermicro";
@@ -925,7 +925,7 @@ foreach ($config['os'] as $this_os => $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';
@@ -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 0796556df..bed291a9b 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 7c30dca73..704f4fb9a 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 5948400b9..804c8189c 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/cisco-pw.inc.php b/includes/discovery/cisco-pw.inc.php
index 07cce92ab..4c58b837c 100755
--- a/includes/discovery/cisco-pw.inc.php
+++ b/includes/discovery/cisco-pw.inc.php
@@ -7,7 +7,7 @@ if ($config['enable_pseudowires'] && $device['os_group'] == "cisco")
echo("Cisco Pseudowires : ");
- /// Pre-cache the existing state of pseudowires for this device from the database
+ // Pre-cache the existing state of pseudowires for this device from the database
$pws_db_raw = dbFetchRows("SELECT * FROM `pseudowires` WHERE `device_id` = ?", array($device['device_id']));
foreach ($pws_db_raw as $pw_db)
{
@@ -21,7 +21,7 @@ if ($config['enable_pseudowires'] && $device['os_group'] == "cisco")
$pws = snmpwalk_cache_oid($device, "cpwVcPsnType", $pws, "CISCO-IETF-PW-MPLS-MIB");
$pws = snmpwalk_cache_oid($device, "cpwVcDescr", $pws, "CISCO-IETF-PW-MPLS-MIB");
- /// For MPLS pseudowires
+ // For MPLS pseudowires
$pws = snmpwalk_cache_oid($device, "cpwVcMplsPeerLdpID", $pws, "CISCO-IETF-PW-MPLS-MIB");
foreach ($pws as $pw_id => $pw)
@@ -44,7 +44,7 @@ if ($config['enable_pseudowires'] && $device['os_group'] == "cisco")
$device['pws'][$pw['cpwVcID']] = $pseudowire_id;
}
- /// Cycle the list of pseudowires we cached earlier and make sure we saw them again.
+ // Cycle the list of pseudowires we cached earlier and make sure we saw them again.
foreach ($device['pws_db'] as $pw_id => $pseudowire_id)
{
if (empty($device['pws'][$pw_id]))
diff --git a/includes/discovery/current.inc.php b/includes/discovery/current.inc.php
index d7cc94aba..ef60dbfb9 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 fcb986280..1ebb71c00 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 d8eb1efa5..5f5397528 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 ae18f08a8..05eb9147a 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 ee2bc965c..17823b999 100755
--- a/includes/discovery/ports.inc.php
+++ b/includes/discovery/ports.inc.php
@@ -1,21 +1,21 @@
-/// -- 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)
{
@@ -23,10 +23,10 @@ foreach (dbFetchRows("SELECT * FROM `ports` WHERE `device_id` = ?", array($devic
$ports_db_l[$port['ifIndex']] = $port['port_id'];
}
-/// New interface detection
+// New interface detection
foreach ($port_stats as $ifIndex => $port)
{
- /// Check the port against our filters.
+ // Check the port against our filters.
if (is_port_valid($port, $device))
{
if (!is_array($ports_db[$ifIndex]))
@@ -41,7 +41,7 @@ foreach ($port_stats as $ifIndex => $port)
} else {
echo(".");
}
- /// We've seen it. Remove it from the cache.
+ // We've seen it. Remove it from the cache.
unset($ports_l[$ifIndex]);
} else {
if (is_array($ports_db[$port['ifIndex']])) {
@@ -55,10 +55,10 @@ foreach ($port_stats as $ifIndex => $port)
echo("X");
}
}
-/// End New interface detection
+// End New interface detection
-/// Interface Deletion
-/// If it's in our $ports_l list, that means it's not been seen. Mark it deleted.
+// Interface Deletion
+// If it's in our $ports_l list, that means it's not been seen. Mark it deleted.
foreach ($ports_l as $ifIndex => $port_id)
{
if ($ports_db[$ifIndex]['deleted'] == "0")
@@ -67,10 +67,10 @@ foreach ($ports_l as $ifIndex => $port_id)
echo("-".$ifIndex);
}
}
-/// End interface deletion
+// End interface deletion
echo("\n");
-/// Clear Variables Here
+// Clear Variables Here
unset($port_stats);
unset($ports_db);
unset($ports_db_db);
diff --git a/includes/discovery/power.inc.php b/includes/discovery/power.inc.php
index 0493c46d5..838853de2 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 a145db352..acd51cebd 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 07b98ef96..b186b602d 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 363e946e4..d6fc75379 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 0d3b30af1..a5f123b0b 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 bc92c37b9..93931da10 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 f5cc9eef8..8bd72bb5c 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 2c32bb308..474649ca6 100644
--- a/includes/discovery/temperatures/cisco-envmon.inc.php
+++ b/includes/discovery/temperatures/cisco-envmon.inc.php
@@ -1,6 +1,6 @@
VLAN relationships. This is DIRTY.
+// Fetch switchport <> VLAN relationships. This is DIRTY.
foreach ($device['vlans'] as $domain_id => $vlans)
{
foreach ($vlans as $vlan_id => $vlan)
{
- /// Pull Tables for this VLAN
+ // Pull Tables for this VLAN
#/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?
- if (is_numeric($vlan_id) && ($vlan_id <1002 || $vlan_id > 1105)) /// Ignore reserved VLAN IDs
+ // 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
+ if ($device['os_group'] == "cisco" || $device['os'] == "ios") // This shit only seems to work on IOS
{
# Probably does not work with snmpv3. I have no real idea about what this code is really doing
$vlan_device = array_merge($device, array('community' => $device['community']."@".$vlan_id));
diff --git a/includes/discovery/vlans/cisco-vtp.inc.php b/includes/discovery/vlans/cisco-vtp.inc.php
index e98ba77cf..83ba7274a 100755
--- a/includes/discovery/vlans/cisco-vtp.inc.php
+++ b/includes/discovery/vlans/cisco-vtp.inc.php
@@ -4,12 +4,12 @@ if ($device['os_group'] == "cisco")
{
echo("Cisco VLANs : ");
- /// Not sure why we check for VTP, but this data comes from that MIB, so...
+ // Not sure why we check for VTP, but this data comes from that MIB, so...
$vtpversion = snmp_get($device, "vtpVersion.0" , "-OnvQ", "CISCO-VTP-MIB");
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 62e608d03..8ee13f012 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));
@@ -225,13 +225,13 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp')
global $config;
list($hostshort) = explode(".", $host);
- /// Test Database Exists
+ // Test Database Exists
if (dbFetchCell("SELECT COUNT(*) FROM `devices` WHERE `hostname` = ?", array($host)) == '0')
{
- /// Test DNS lookup
+ // Test DNS lookup
if (gethostbyname($host) != $host)
{
- /// Test reachability
+ // Test reachability
if (isPingable($host))
{
$added = 0;
@@ -283,7 +283,7 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp')
}
elseif ($snmpver === "v2c" or $snmpver === "v1")
{
- /// try each community from config
+ // try each community from config
foreach ($config['snmp']['community'] as $community)
{
$device = deviceArray($host, $community, $snmpver, $port, $transport, NULL);
@@ -310,17 +310,17 @@ function addHost($host, $snmpver, $port = '161', $transport = 'udp')
if (!$device_id)
{
- /// Failed SNMP
+ // Failed SNMP
print_error("Could not reach $host with given SNMP community using $snmpver");
}
} else {
- /// failed Reachability
+ // failed Reachability
print_error("Could not ping $host"); }
} else {
- /// Failed DNS lookup
+ // Failed DNS lookup
print_error("Could not resolve $host"); }
} else {
- /// found in database
+ // found in database
print_error("Already got host $host");
}
diff --git a/includes/include-dir.inc.php b/includes/include-dir.inc.php
index 60981343b..49155614b 100644
--- a/includes/include-dir.inc.php
+++ b/includes/include-dir.inc.php
@@ -1,6 +1,6 @@
'cr',
@@ -203,7 +203,7 @@ if (!is_file($mysql_rrd))
rrdtool_update($mysql_rrd, "N:$string");
-/// Process state statistics
+// Process state statistics
$mysql_status_rrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/app-mysql-".$app['app_id']."-status.rrd";
diff --git a/includes/polling/applications/nginx.inc.php b/includes/polling/applications/nginx.inc.php
index b41d216e0..72defc804 100644
--- a/includes/polling/applications/nginx.inc.php
+++ b/includes/polling/applications/nginx.inc.php
@@ -26,7 +26,7 @@ if (!is_file($nginx_rrd))
print "active: $active reading: $reading writing: $writing waiting: $waiting Requests: $req";
rrdtool_update($nginx_rrd, "N:$req:$active:$reading:$writing:$waiting");
-/// Unset the variables we set here
+// Unset the variables we set here
unset($nginx);
unset($nginx_rrd);
diff --git a/includes/polling/applications/ntp-client.inc.php b/includes/polling/applications/ntp-client.inc.php
index 651f35400..904be6ac1 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 77287c769..d8d92df77 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/hr-mib.inc.php b/includes/polling/hr-mib.inc.php
index 2e7cc34e6..bd89269f8 100755
--- a/includes/polling/hr-mib.inc.php
+++ b/includes/polling/hr-mib.inc.php
@@ -1,6 +1,6 @@
$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 85ff945a8..ee0d3405d 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 864ad4b03..a156ea19e 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 29f345784..6f1033244 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 ee4592c27..0b2a9323b 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 39ee22bd8..3e7e5ca49 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 23c52c058..69a05eb84 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 fd0e8a8b4..6cd1ab8d8 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 6d3f33589..1abe8c623 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 7bfb9f4f0..d00d9f716 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 5882d61c2..cf93ab9fe 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") { /// Workstatio
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") { /// Workstatio
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") { /// Workstatio
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 7e2e32d05..a7cc83078 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 53f7df28e..2b6d33533 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 d95d920a3..d827bef2b 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 d14a63d7b..25ad38486 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 5e8d12cfb..bca70b1ec 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 a6b8774ac..304e61b7d 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 12f5e8954..baaceadc4 100644
--- a/includes/polling/wifi.inc.php
+++ b/includes/polling/wifi.inc.php
@@ -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-')
diff --git a/includes/port-descr-parser.inc.php b/includes/port-descr-parser.inc.php
index 6a97f8aa8..710d8c931 100644
--- a/includes/port-descr-parser.inc.php
+++ b/includes/port-descr-parser.inc.php
@@ -1,7 +1,7 @@
+ // 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
///
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/scripts/ntp-client.php b/scripts/ntp-client.php
index 9693af5a6..85929b7c5 100644
--- a/scripts/ntp-client.php
+++ b/scripts/ntp-client.php
@@ -3,31 +3,31 @@
///////////////////////////////////////////////////////////////////////////////////////
///
- /// A small script to grab the NTP Client statistics from a NTPD server
- /// Needed commands: php, ntpd, ntpq
+ // 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
+ // 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
+ // 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
///
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/scripts/ntpd-server.php b/scripts/ntpd-server.php
index b7fb551fb..56442f13f 100644
--- a/scripts/ntpd-server.php
+++ b/scripts/ntpd-server.php
@@ -3,20 +3,20 @@
///////////////////////////////////////////////////////////////////////////////////////
///
- /// A small script to grab the NTPD Server statistics from a NTPD server
- /// Needed commands: php, ntpd, ntpq, ntpdc
+ // 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
+ // 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
+ // Version 1.1 By:
+ // All In One - Dennis de Houx
///
///////////////////////////////////////////////////////////////////////////////////////
- /// START SETTINGS ///
+ // START SETTINGS ///
$ntpq = "/usr/sbin/ntpq";
$ntpdc = "/usr/sbin/ntpdc";
@@ -24,11 +24,11 @@
# 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
///
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/scripts/powerdns.php b/scripts/powerdns.php
index d09b85998..e010d714d 100755
--- a/scripts/powerdns.php
+++ b/scripts/powerdns.php
@@ -3,28 +3,28 @@
///////////////////////////////////////////////////////////////////////////////////////
///
-/// A small script to grab the DNS statistics from a PowerDNS server
-/// Needed commands: php, pdns_control
+// 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
+// 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
+// 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
///
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/scripts/shoutcast.php b/scripts/shoutcast.php
index 1c5e7422e..0d5df8f20 100644
--- a/scripts/shoutcast.php
+++ b/scripts/shoutcast.php
@@ -3,32 +3,32 @@
///////////////////////////////////////////////////////////////////////////////////////
///
- /// A small script to grab the realtime statistics from a ShoutCast server
- /// Needed commands: 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
+ // 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
+ // 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
///
///////////////////////////////////////////////////////////////////////////////////////
diff --git a/scripts/update-sql.php b/scripts/update-sql.php
index 857d545b8..348671841 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");
}
}