diff --git a/html/includes/print-syslog.inc.php b/html/includes/print-syslog.inc.php
index 0c78ee8d05..2f02b85844 100644
--- a/html/includes/print-syslog.inc.php
+++ b/html/includes/print-syslog.inc.php
@@ -8,22 +8,21 @@ if (device_permitted($entry['device_id']))
echo("
| ");
- echo("" . $entry['date'] . " | ");
$entry['hostname'] = shorthost($entry['hostname'], 20);
if ($_GET['page'] != "device")
{
+ echo("" . $entry['date'] . " | ");
echo("".generate_device_link($entry)." | ");
+ echo("" . $entry['program'] . " : " . htmlspecialchars($entry['msg']) . " | ");
+ } else {
+ echo("" . $entry['date'] . " " . $entry['program'] . " " . htmlspecialchars($entry['msg']) . " | ");
+
}
- echo("
- " . $entry['program'] . " :
- " . htmlspecialchars($entry['msg']) . "
- |
- |
-
");
+ echo("");
}
-?>
\ No newline at end of file
+?>
diff --git a/html/pages/device/entphysical.inc.php b/html/pages/device/entphysical.inc.php
index b180050e6f..72844d0e66 100644
--- a/html/pages/device/entphysical.inc.php
+++ b/html/pages/device/entphysical.inc.php
@@ -18,7 +18,12 @@ function printEntPhysical($ent, $level, $class)
{
echo("
");
# FIXME /ciscosensors? doesn't exist anymore methinks? or does it?
- $link = " href='device/".$device['device_id']."/ciscosensors/".$ent['entSensorType']."/' onmouseover=\"return overlib('
', LEFT,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\"";
+
+ $sensor = dbFetchRow("SELECT * FROM `sensors` WHERE `device_id` = ? AND `entPhysicalIndex` = ?", array($device['device_id'], $ent['entPhysicalIndex']));
+
+ print_r($sensor);
+
+ $link = " href='device/".$device['device_id']."/health/".$sensor['sensor_class']."/' onmouseover=\"return overlib('
', LEFT,FGCOLOR,'#e5e5e5', BGCOLOR, '#c0c0c0', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#050505');\" onmouseout=\"return nd();\"";
} else { unset ($link); }
if ($ent['entPhysicalClass'] == "backplane") { echo("
"); }
diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php
index fdc3ceaa30..0f37130a61 100644
--- a/html/pages/device/overview.inc.php
+++ b/html/pages/device/overview.inc.php
@@ -60,7 +60,7 @@ if ($services['total'])
### FIXME - split this into overview/syslog.inc.php?
-$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%d/%b/%y %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
+$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
if (is_array($syslog))
{
echo("");
diff --git a/html/pages/device/syslog.inc.php b/html/pages/device/syslog.inc.php
index c045867adf..2655eb2594 100644
--- a/html/pages/device/syslog.inc.php
+++ b/html/pages/device/syslog.inc.php
@@ -43,7 +43,7 @@ if ($_POST['program'])
$param[] = $_POST['program'];
}
-$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog WHERE device_id = ? $where";
+$sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? $where";
$sql .= " ORDER BY timestamp DESC LIMIT 1000";
echo("
");
foreach (dbFetchRows($sql, $param) as $entry) { include("includes/print-syslog.inc.php"); }
diff --git a/html/pages/syslog.inc.php b/html/pages/syslog.inc.php
index 65427f580c..94b7bbbbd5 100644
--- a/html/pages/syslog.inc.php
+++ b/html/pages/syslog.inc.php
@@ -67,14 +67,14 @@ if (is_numeric($_POST['device']))
if ($_SESSION['userlevel'] >= '5')
{
- $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog AS S";
+ $sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog AS S";
if(count($array))
{
$sql .= " WHERE 1 ".$where;
}
$sql .= " ORDER BY timestamp DESC LIMIT 1000";
} else {
- $sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog AS S, devices_perms AS P";
+ $sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog AS S, devices_perms AS P";
$sql .= "WHERE S.device_id = P.device_id AND P.user_id = ?";
if(count($array))
{
diff --git a/includes/discovery/cisco-entity-sensor.inc.php b/includes/discovery/cisco-entity-sensor.inc.php
index 927fd1c4a1..b7dae4ecf6 100644
--- a/includes/discovery/cisco-entity-sensor.inc.php
+++ b/includes/discovery/cisco-entity-sensor.inc.php
@@ -138,7 +138,7 @@ if ($device['os'] == "ios" || $device['os_group'] == "ios")
if ($ok) {
# echo("\n".$valid['sensor'].", $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current");
- discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current);
+ discover_sensor($valid['sensor'], $type, $device, $oid, $index, 'cisco-entity-sensor', $descr, $divisor, $multiplier, $limit_low, $warn_limit_low, $limit, $warn_limit, $current, $entPhysicalIndex, $entry['entSensorMeasuredEntity']);
}
$cisco_entity_temperature = 1;
unset($limit, $limit_low, $warn_limit, $warn_limit_low);
diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php
index 0f37f9b6eb..269b892c40 100644
--- a/includes/discovery/functions.inc.php
+++ b/includes/discovery/functions.inc.php
@@ -1,11 +1,11 @@
$oid, 'sensor_descr' => $descr, 'sensor_multiplier' => $multiplier, 'sensor_divisor' => $divisor);
+ $update = array('sensor_oid' => $oid, 'sensor_descr' => $descr, 'sensor_multiplier' => $multiplier, 'sensor_divisor' => $divisor,
+ 'entPhysicalIndex' => $entPhysicalIndex, 'entPhysicalIndex_measured' => $entPhysicalIndex_measured);
$updated = dbUpdate($update, '`sensor_id` = ?', array($sensor_entry['sensor_id']));
echo("U");
log_event("Sensor Updated: ".mres($class)." ".mres($type)." ". mres($index)." ".mres($descr), $device, 'sensor', $sensor_id);