diff --git a/README b/README index 567d3beb5..e10fcb627 100644 --- a/README +++ b/README @@ -20,6 +20,15 @@ Please see http://www.project-observer.org. Changelog --------- +Pre-Release 0.3.3 + +Much prettier front page. + + +Release 0.3.2.1 ( 27th March 2008 ) + +Minor bugfix to interface discovery engine. + Release 0.3.2 ( 26th March 2008 ) Added BGP peer detection and watching diff --git a/html/css/styles.css b/html/css/styles.css index 44337cc9a..d053e1fca 100644 --- a/html/css/styles.css +++ b/html/css/styles.css @@ -1,3 +1,152 @@ +.content-box{display:block} +.content-box *{ + display:block; + height:1px; + overflow:hidden; + font-size:.01em; + background:#e5e5e5} +.content-box1{ + margin-left:3px; + margin-right:3px; + padding-left:1px; + padding-right:1px; + border-left:1px solid #f3f3f3; + border-right:1px solid #f3f3f3; + background:#ebebeb} +.content-box2{ + margin-left:1px; + margin-right:1px; + padding-right:1px; + padding-left:1px; + border-left:1px solid #fcfcfc; + border-right:1px solid #fcfcfc; + background:#e9e9e9} +.content-box3{ + margin-left:1px; + margin-right:1px; + border-left:1px solid #e9e9e9; + border-right:1px solid #e9e9e9;} +.content-box4{ + border-left:1px solid #f3f3f3; + border-right:1px solid #f3f3f3} +.content-box5{ + border-left:1px solid #ebebeb; + border-right:1px solid #ebebeb} +.content-boxfg{ + background:#e5e5e5} + +.box-info{display:block} +.box-info *{ + display:block; + height:1px; + overflow:hidden; + font-size:.01em; + background:#aaffaa} +.box-info1{ + margin-left:3px; + margin-right:3px; + padding-left:1px; + padding-right:1px; + border-left:1px solid #cbf0cb; + border-right:1px solid #cbf0cb; + background:#b8f8b8} +.box-info2{ + margin-left:1px; + margin-right:1px; + padding-right:1px; + padding-left:1px; + border-left:1px solid #dfe7df; + border-right:1px solid #dfe7df; + background:#b5fab5} +.box-info3{ + margin-left:1px; + margin-right:1px; + border-left:1px solid #b5fab5; + border-right:1px solid #b5fab5;} +.box-info4{ + border-left:1px solid #cbf0cb; + border-right:1px solid #cbf0cb} +.box-info5{ + border-left:1px solid #b8f8b8; + border-right:1px solid #b8f8b8} +.box-infofg{ + background:#aaffaa} + +.box-warn{display:block} +.box-warn *{ + display:block; + height:1px; + overflow:hidden; + font-size:.01em; + background:#AAAAFF} +.box-warn1{ + margin-left:3px; + margin-right:3px; + padding-left:1px; + padding-right:1px; + border-left:1px solid #dadaff; + border-right:1px solid #dadaff; + background:#bfbfff} +.box-warn2{ + margin-left:1px; + margin-right:1px; + padding-right:1px; + padding-left:1px; + border-left:1px solid #f6f6ff; + border-right:1px solid #f6f6ff; + background:#babaff} +.box-warn3{ + margin-left:1px; + margin-right:1px; + border-left:1px solid #babaff; + border-right:1px solid #babaff;} +.box-warn4{ + border-left:1px solid #dadaff; + border-right:1px solid #dadaff} +.box-warn5{ + border-left:1px solid #bfbfff; + border-right:1px solid #bfbfff} +.box-warnfg{ + background:#AAAAFF} + +.box-alert{display:block} +.box-alert *{ + display:block; + height:1px; + overflow:hidden; + font-size:.01em; + background:#FFAAAA} +.box-alert1{ + margin-left:3px; + margin-right:3px; + padding-left:1px; + padding-right:1px; + border-left:1px solid #ffdada; + border-right:1px solid #ffdada; + background:#ffbfbf} +.box-alert2{ + margin-left:1px; + margin-right:1px; + padding-right:1px; + padding-left:1px; + border-left:1px solid #fff6f6; + border-right:1px solid #fff6f6; + background:#ffbaba} +.box-alert3{ + margin-left:1px; + margin-right:1px; + border-left:1px solid #ffbaba; + border-right:1px solid #ffbaba;} +.box-alert4{ + border-left:1px solid #ffdada; + border-right:1px solid #ffdada} +.box-alert5{ + border-left:1px solid #ffbfbf; + border-right:1px solid #ffbfbf} +.box-alertfg{ + background:#FFAAAA} + + img { border: 0; } A { text-decoration: none; } @@ -615,7 +764,7 @@ input { #top{ height:17px; padding:2px 21px 0px 21px; - background:#163275; +# background:#163275; font:normal 11px arial; color: white; } diff --git a/html/includes/print-event.inc b/html/includes/print-event.inc index 75c50f6c1..10502e5f0 100644 --- a/html/includes/print-event.inc +++ b/html/includes/print-event.inc @@ -14,30 +14,26 @@ if($bg == $list_colour_a) { $bg = $list_colour_b; } else { $bg=$list_colour_a; } echo(" - + " . $entry['datetime'] . " "); if(!$_GET[id] && !$overview) { $dev['device_id'] = $entry['host']; $dev['hostname'] = $hostname; - echo(" - " . generatedevicelink($dev) . " + echo(" + " . generatedevicelink($dev, shorthost($dev['hostname'])) . " "); } - echo(""); + echo(""); if($interface) { $if['interface_id'] = $entry['interface']; $if['ifDescr'] = $interface; echo(generateiflink($if)); } - echo(" - $icon - - " . htmlspecialchars($entry['message']) . " + echo(" " . htmlspecialchars($entry['message']) . " - "); diff --git a/html/index.php b/html/index.php index 3e2cfe6f1..323beb695 100755 --- a/html/index.php +++ b/html/index.php @@ -50,7 +50,7 @@ function popUp(URL) {
-
+
;'> diff --git a/html/pages/default.php b/html/pages/default.php index 52f14801d..814c2a60b 100644 --- a/html/pages/default.php +++ b/html/pages/default.php @@ -1,11 +1,27 @@ + - - -?> - + + + + + + +
+ ".$content." +
+ + + + + + + "); +} + + +echo("
"); $nodes = array(); @@ -22,7 +38,6 @@ while($device = mysql_fetch_array($sql)){ $i++; } if(!$already) { $nodes[] = $device['device_id']; } -} $sql = mysql_query("SELECT * FROM `devices` WHERE `status` = '0' AND `ignore` = '0'"); @@ -34,77 +49,111 @@ while($device = mysql_fetch_array($sql)){ ".truncate($device['location'], 20)."
"); + } $sql = mysql_query("SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.device_id AND ifOperStatus = 'down' AND ifAdminStatus = 'up' AND D.ignore = '0' AND I.ignore = '0'"); while($interface = mysql_fetch_array($sql)){ - echo("
-
".generatedevicelink($interface, shorthost($interface['hostname']))."
- Port Down + generate_front_box("warn", "
".generatedevicelink($interface, shorthost($interface['hostname']))."
+ Port Down ".generateiflink($interface, makeshortif($interface['ifDescr']))."
".truncate($interface['ifAlias'], 20)." -
"); + "); } $sql = mysql_query("SELECT * FROM `services` AS S, `devices` AS D WHERE S.service_host = D.device_id AND service_status = 'down' AND D.ignore = '0' AND S.service_ignore = '0'"); while($service = mysql_fetch_array($sql)){ - echo("
-
".generatedevicelink($service, shorthost($service['hostname']))."
+ + generate_front_box("alert", "
".generatedevicelink($service, shorthost($service['hostname']))."
Service Down ".$service['service_type']."
".truncate($interface['ifAlias'], 20)." -
"); + "); } $sql = mysql_query("SELECT * FROM `devices` AS D, bgpPeers AS B WHERE bgpPeerState != 'established' AND B.device_id = D.device_id"); while($peer = mysql_fetch_array($sql)){ - echo("
-
".generatedevicelink($peer, shorthost($peer['hostname']))."
+ generate_front_box("alert", "
".generatedevicelink($peer, shorthost($peer['hostname']))."
BGP Down ".$peer['bgpPeerIdentifier']."
AS".$peer['bgpPeerRemoteAs']." ".truncate($peer['astext'], 10)." -
"); + "); } $sql = mysql_query("SELECT * FROM `devices` AS D, devices_attribs AS A WHERE A.device_id = D.device_id AND A.attrib_type = 'uptime' AND A.attrib_value < '84600'"); while($device = mysql_fetch_array($sql)){ - echo("
-
".generatedevicelink($device, shorthost($device['hostname']))."
- Device
Rebooted

+ + generate_front_box("info", "
".generatedevicelink($device, shorthost($device['hostname']))."
+ Device
Rebooted

".formatUptime($device['attrib_value'])." -
"); + "); } +if($config['frontpage_display'] == 'syslog') { -echo(" + ## Open Syslog Div + echo("
+

Recent Syslog Messages

+ "); -
$errorboxes
+ $sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog ORDER BY datetime DESC LIMIT 20"; + $query = mysql_query($sql); + echo("
-
Devices with Alerts
Host
Int
Srv
"); + while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } + echo("
"); -

Recent Syslog Messages

+ echo("
"); ## Close Syslog Div -"); +} else { + + ## Open eventlog Div + echo("
+

Recent Eventlog Entries

+ "); + +if($_SESSION['userlevel'] == '10') { + $query = "SELECT *,DATE_FORMAT(datetime, '%D %b %T') as humandate FROM `eventlog` ORDER BY `datetime` DESC LIMIT 0,15"; +} else { + $query = "SELECT *,DATE_FORMAT(datetime, '%D %b %T') as humandate FROM `eventlog` AS E, devices_perms AS P WHERE E.host = + P.device_id AND P.user_id = " . $_SESSION['user_id'] . " ORDER BY `datetime` DESC LIMIT 0,15"; +} + +$data = mysql_query($query); + +echo(""); + +while($entry = mysql_fetch_array($data)) { + include("includes/print-event.inc"); +} -$sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog ORDER BY datetime DESC LIMIT 20"; -$query = mysql_query($sql); -echo("
"); -while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } echo("
"); + + + echo("
"); ## Close Syslog Div -echo("
+} - - "); +echo("
"); +echo("
+ + + + + + + +
"); /// this stuff can be customised to show whatever you want.... @@ -163,11 +212,21 @@ if($_SESSION['userlevel'] >= '5') { } +echo("
+ + + + + + + +
+"); + +#echo(""); + /// END VOSTRON -?> - +} - - - +?>