mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
support TRACE syslog level; add loglevel style colors and change color for full line; limit empty search to 6h; change datelastx behaviour - use number as hours indicator;
This commit is contained in:
parent
ec2f05ab1f
commit
f1985040a5
@ -1496,9 +1496,10 @@ class LogStreamDB extends LogStream {
|
||||
if ( $myfilter[FILTER_DATEMODE] == DATEMODE_LASTX )
|
||||
{
|
||||
// Get current timestamp
|
||||
$nNowTimeStamp = time();
|
||||
|
||||
$nNowTimeStamp = time() - (60 * 60 * intval($myfilter[FILTER_VALUE]));
|
||||
|
||||
if ( $myfilter[FILTER_VALUE] == DATE_LASTX_HOUR )
|
||||
/*if ( $myfilter[FILTER_VALUE] == DATE_LASTX_HOUR )
|
||||
$nNowTimeStamp -= 60 * 60; // One Hour!
|
||||
else if ( $myfilter[FILTER_VALUE] == DATE_LASTX_12HOURS )
|
||||
$nNowTimeStamp -= 60 * 60 * 12; // 12 Hours!
|
||||
@ -1513,7 +1514,7 @@ class LogStreamDB extends LogStream {
|
||||
// Set filter to unknown and Abort in this case!
|
||||
$tmpfilters[$propertyname][FILTER_TYPE] = FILTER_TYPE_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Append filter
|
||||
$tmpfilters[$propertyname][FILTER_VALUE] .= $dbmapping[$szTableType]['DBMAPPINGS'][$propertyname] . " > '" . date("Y-m-d H:i:s", $nNowTimeStamp) . "'";
|
||||
|
@ -109,6 +109,8 @@ $content['filter_severity_list'][] = array( "ID" => SYSLOG_WARNING, "DisplayName
|
||||
$content['filter_severity_list'][] = array( "ID" => SYSLOG_NOTICE, "DisplayName" => "NOTICE", "selected" => "" );
|
||||
$content['filter_severity_list'][] = array( "ID" => SYSLOG_INFO, "DisplayName" => "INFO", "selected" => "" );
|
||||
$content['filter_severity_list'][] = array( "ID" => SYSLOG_DEBUG, "DisplayName" => "DEBUG", "selected" => "" );
|
||||
$content['filter_severity_list'][] = array( "ID" => SYSLOG_TRACE, "DisplayName" => "TRACE", "selected" => "" );
|
||||
|
||||
// ---
|
||||
|
||||
// Init MessageType LIST
|
||||
@ -118,4 +120,4 @@ $content['filter_messagetype_list'][] = array( "ID" => IUT_NT_EventReport, "Disp
|
||||
$content['filter_messagetype_list'][] = array( "ID" => IUT_File_Monitor, "DisplayName" => "File Monitor", "selected" => "" );
|
||||
$content['filter_messagetype_list'][] = array( "ID" => IUT_WEBSERVERLOG, "DisplayName" => "Webserver Logfile", "selected" => "" );
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -169,6 +169,8 @@ define('SYSLOG_WARNING', 4);
|
||||
define('SYSLOG_NOTICE', 5);
|
||||
define('SYSLOG_INFO', 6);
|
||||
define('SYSLOG_DEBUG', 7);
|
||||
define('SYSLOG_TRACE', 8);
|
||||
|
||||
$severity_colors[SYSLOG_EMERG] = "#840A15";
|
||||
$severity_colors[SYSLOG_ALERT] = "#BA0716";
|
||||
$severity_colors[SYSLOG_CRIT] = "#CE0819";
|
||||
@ -177,6 +179,8 @@ $severity_colors[SYSLOG_WARNING] = "#EF8200";
|
||||
$severity_colors[SYSLOG_NOTICE] = "#14AD42";
|
||||
$severity_colors[SYSLOG_INFO] = "#0C9C91";
|
||||
$severity_colors[SYSLOG_DEBUG] = "#119BDE";
|
||||
$severity_colors[SYSLOG_TRACE] = "#C0C381";
|
||||
|
||||
// ---
|
||||
|
||||
// --- MonitorWare InfoUnit Defines | Messagetypes
|
||||
|
@ -237,7 +237,7 @@ function InitFilterHelpers()
|
||||
if ( isset($_SESSION['filter_severity']) )
|
||||
$filters['filter_severity'] = intval($_SESSION['filter_severity']);
|
||||
else
|
||||
$filters['filter_severity'] = array ( SYSLOG_EMERG, SYSLOG_ALERT, SYSLOG_CRIT, SYSLOG_ERR, SYSLOG_WARNING, SYSLOG_NOTICE, SYSLOG_INFO, SYSLOG_DEBUG );
|
||||
$filters['filter_severity'] = array ( SYSLOG_EMERG, SYSLOG_ALERT, SYSLOG_CRIT, SYSLOG_ERR, SYSLOG_WARNING, SYSLOG_NOTICE, SYSLOG_INFO, SYSLOG_DEBUG, SYSLOG_TRACE );
|
||||
|
||||
$iCount = count($content['filter_severity_list']);
|
||||
for ( $i = 0; $i < $iCount; $i++ )
|
||||
@ -363,4 +363,4 @@ function GetDateTimeDetailsFromTimeString($szTimeString, &$second, &$minute, &$h
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
375
src/index.html
375
src/index.html
@ -1,375 +0,0 @@
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!--
|
||||
Modified from the Debian original for Ubuntu
|
||||
Last updated: 2016-11-16
|
||||
See: https://launchpad.net/bugs/1288690
|
||||
-->
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Apache2 Ubuntu Default Page: It works</title>
|
||||
<style type="text/css" media="screen">
|
||||
* {
|
||||
margin: 0px 0px 0px 0px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
body, html {
|
||||
padding: 3px 3px 3px 3px;
|
||||
|
||||
background-color: #D8DBE2;
|
||||
|
||||
font-family: Verdana, sans-serif;
|
||||
font-size: 11pt;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.main_page {
|
||||
position: relative;
|
||||
display: table;
|
||||
|
||||
width: 800px;
|
||||
|
||||
margin-bottom: 3px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 0px 0px 0px 0px;
|
||||
|
||||
border-width: 2px;
|
||||
border-color: #212738;
|
||||
border-style: solid;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.page_header {
|
||||
height: 99px;
|
||||
width: 100%;
|
||||
|
||||
background-color: #F5F6F7;
|
||||
}
|
||||
|
||||
div.page_header span {
|
||||
margin: 15px 0px 0px 50px;
|
||||
|
||||
font-size: 180%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.page_header img {
|
||||
margin: 3px 0px 0px 40px;
|
||||
|
||||
border: 0px 0px 0px;
|
||||
}
|
||||
|
||||
div.table_of_contents {
|
||||
clear: left;
|
||||
|
||||
min-width: 200px;
|
||||
|
||||
margin: 3px 3px 3px 3px;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.table_of_contents_item {
|
||||
clear: left;
|
||||
|
||||
width: 100%;
|
||||
|
||||
margin: 4px 0px 0px 0px;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
|
||||
color: #000000;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.table_of_contents_item a {
|
||||
margin: 6px 0px 0px 6px;
|
||||
}
|
||||
|
||||
div.content_section {
|
||||
margin: 3px 3px 3px 3px;
|
||||
|
||||
background-color: #FFFFFF;
|
||||
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.content_section_text {
|
||||
padding: 4px 8px 4px 8px;
|
||||
|
||||
color: #000000;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
div.content_section_text pre {
|
||||
margin: 8px 0px 8px 0px;
|
||||
padding: 8px 8px 8px 8px;
|
||||
|
||||
border-width: 1px;
|
||||
border-style: dotted;
|
||||
border-color: #000000;
|
||||
|
||||
background-color: #F5F6F7;
|
||||
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.content_section_text p {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
div.content_section_text ul, div.content_section_text li {
|
||||
padding: 4px 8px 4px 16px;
|
||||
}
|
||||
|
||||
div.section_header {
|
||||
padding: 3px 6px 3px 6px;
|
||||
|
||||
background-color: #8E9CB2;
|
||||
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
font-size: 112%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.section_header_red {
|
||||
background-color: #CD214F;
|
||||
}
|
||||
|
||||
div.section_header_grey {
|
||||
background-color: #9F9386;
|
||||
}
|
||||
|
||||
.floating_element {
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.table_of_contents_item a,
|
||||
div.content_section_text a {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.table_of_contents_item a:link,
|
||||
div.table_of_contents_item a:visited,
|
||||
div.table_of_contents_item a:active {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
div.table_of_contents_item a:hover {
|
||||
background-color: #000000;
|
||||
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
div.content_section_text a:link,
|
||||
div.content_section_text a:visited,
|
||||
div.content_section_text a:active {
|
||||
background-color: #DCDFE6;
|
||||
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
div.content_section_text a:hover {
|
||||
background-color: #000000;
|
||||
|
||||
color: #DCDFE6;
|
||||
}
|
||||
|
||||
div.validator {
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="main_page">
|
||||
<div class="page_header floating_element">
|
||||
<img src="/icons/ubuntu-logo.png" alt="Ubuntu Logo" class="floating_element"/>
|
||||
<span class="floating_element">
|
||||
Apache2 Ubuntu Default Page
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="table_of_contents floating_element">
|
||||
<div class="section_header section_header_grey">
|
||||
TABLE OF CONTENTS
|
||||
</div>
|
||||
<div class="table_of_contents_item floating_element">
|
||||
<a href="#about">About</a>
|
||||
</div>
|
||||
<div class="table_of_contents_item floating_element">
|
||||
<a href="#changes">Changes</a>
|
||||
</div>
|
||||
<div class="table_of_contents_item floating_element">
|
||||
<a href="#scope">Scope</a>
|
||||
</div>
|
||||
<div class="table_of_contents_item floating_element">
|
||||
<a href="#files">Config files</a>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
<div class="content_section floating_element">
|
||||
|
||||
|
||||
<div class="section_header section_header_red">
|
||||
<div id="about"></div>
|
||||
It works!
|
||||
</div>
|
||||
<div class="content_section_text">
|
||||
<p>
|
||||
This is the default welcome page used to test the correct
|
||||
operation of the Apache2 server after installation on Ubuntu systems.
|
||||
It is based on the equivalent page on Debian, from which the Ubuntu Apache
|
||||
packaging is derived.
|
||||
If you can read this page, it means that the Apache HTTP server installed at
|
||||
this site is working properly. You should <b>replace this file</b> (located at
|
||||
<tt>/var/www/html/index.html</tt>) before continuing to operate your HTTP server.
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
If you are a normal user of this web site and don't know what this page is
|
||||
about, this probably means that the site is currently unavailable due to
|
||||
maintenance.
|
||||
If the problem persists, please contact the site's administrator.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<div class="section_header">
|
||||
<div id="changes"></div>
|
||||
Configuration Overview
|
||||
</div>
|
||||
<div class="content_section_text">
|
||||
<p>
|
||||
Ubuntu's Apache2 default configuration is different from the
|
||||
upstream default configuration, and split into several files optimized for
|
||||
interaction with Ubuntu tools. The configuration system is
|
||||
<b>fully documented in
|
||||
/usr/share/doc/apache2/README.Debian.gz</b>. Refer to this for the full
|
||||
documentation. Documentation for the web server itself can be
|
||||
found by accessing the <a href="/manual">manual</a> if the <tt>apache2-doc</tt>
|
||||
package was installed on this server.
|
||||
|
||||
</p>
|
||||
<p>
|
||||
The configuration layout for an Apache2 web server installation on Ubuntu systems is as follows:
|
||||
</p>
|
||||
<pre>
|
||||
/etc/apache2/
|
||||
|-- apache2.conf
|
||||
| `-- ports.conf
|
||||
|-- mods-enabled
|
||||
| |-- *.load
|
||||
| `-- *.conf
|
||||
|-- conf-enabled
|
||||
| `-- *.conf
|
||||
|-- sites-enabled
|
||||
| `-- *.conf
|
||||
</pre>
|
||||
<ul>
|
||||
<li>
|
||||
<tt>apache2.conf</tt> is the main configuration
|
||||
file. It puts the pieces together by including all remaining configuration
|
||||
files when starting up the web server.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<tt>ports.conf</tt> is always included from the
|
||||
main configuration file. It is used to determine the listening ports for
|
||||
incoming connections, and this file can be customized anytime.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
Configuration files in the <tt>mods-enabled/</tt>,
|
||||
<tt>conf-enabled/</tt> and <tt>sites-enabled/</tt> directories contain
|
||||
particular configuration snippets which manage modules, global configuration
|
||||
fragments, or virtual host configurations, respectively.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
They are activated by symlinking available
|
||||
configuration files from their respective
|
||||
*-available/ counterparts. These should be managed
|
||||
by using our helpers
|
||||
<tt>
|
||||
a2enmod,
|
||||
a2dismod,
|
||||
</tt>
|
||||
<tt>
|
||||
a2ensite,
|
||||
a2dissite,
|
||||
</tt>
|
||||
and
|
||||
<tt>
|
||||
a2enconf,
|
||||
a2disconf
|
||||
</tt>. See their respective man pages for detailed information.
|
||||
</li>
|
||||
|
||||
<li>
|
||||
The binary is called apache2. Due to the use of
|
||||
environment variables, in the default configuration, apache2 needs to be
|
||||
started/stopped with <tt>/etc/init.d/apache2</tt> or <tt>apache2ctl</tt>.
|
||||
<b>Calling <tt>/usr/bin/apache2</tt> directly will not work</b> with the
|
||||
default configuration.
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="section_header">
|
||||
<div id="docroot"></div>
|
||||
Document Roots
|
||||
</div>
|
||||
|
||||
<div class="content_section_text">
|
||||
<p>
|
||||
By default, Ubuntu does not allow access through the web browser to
|
||||
<em>any</em> file apart of those located in <tt>/var/www</tt>,
|
||||
<a href="http://httpd.apache.org/docs/2.4/mod/mod_userdir.html" rel="nofollow">public_html</a>
|
||||
directories (when enabled) and <tt>/usr/share</tt> (for web
|
||||
applications). If your site is using a web document root
|
||||
located elsewhere (such as in <tt>/srv</tt>) you may need to whitelist your
|
||||
document root directory in <tt>/etc/apache2/apache2.conf</tt>.
|
||||
</p>
|
||||
<p>
|
||||
The default Ubuntu document root is <tt>/var/www/html</tt>. You
|
||||
can make your own virtual hosts under /var/www. This is different
|
||||
to previous releases which provides better security out of the box.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section_header">
|
||||
<div id="bugs"></div>
|
||||
Reporting Problems
|
||||
</div>
|
||||
<div class="content_section_text">
|
||||
<p>
|
||||
Please use the <tt>ubuntu-bug</tt> tool to report bugs in the
|
||||
Apache2 package with Ubuntu. However, check <a
|
||||
href="https://bugs.launchpad.net/ubuntu/+source/apache2"
|
||||
rel="nofollow">existing bug reports</a> before reporting a new bug.
|
||||
</p>
|
||||
<p>
|
||||
Please report bugs specific to modules (such as PHP and others)
|
||||
to respective packages, not to the web server itself.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="validator">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -122,7 +122,7 @@ $content['main_pager_last_found'] = false;
|
||||
// Init Sorting variables
|
||||
$content['sorting'] = "";
|
||||
$content['searchstr'] = "";
|
||||
$content['searchstr_htmlform'] = "";
|
||||
$content['searchstr_htmlform'] = "datelastx:6";
|
||||
$content['highlightstr'] = "";
|
||||
$content['highlightstr_htmlform'] = "";
|
||||
$content['EXPAND_HIGHLIGHT'] = "false";
|
||||
@ -202,7 +202,6 @@ if ( (isset($_POST['search']) || isset($_GET['search'])) || (isset($_POST['filte
|
||||
}
|
||||
}
|
||||
// ---
|
||||
|
||||
// --- BEGIN CREATE TITLE
|
||||
$content['TITLE'] = InitPageTitle();
|
||||
|
||||
@ -215,6 +214,10 @@ else
|
||||
|
||||
|
||||
// --- BEGIN Custom Code
|
||||
//by default limit search to some sane range
|
||||
if (empty($content['searchstr'])){
|
||||
$content['searchstr'] = $content['searchstr_htmlform'];
|
||||
}
|
||||
|
||||
// Do not BLOCK other Site Calls
|
||||
WriteClosePHPSession();
|
||||
@ -365,9 +368,9 @@ if ( isset($content['Sources'][$currentSourceID]) )
|
||||
|
||||
// --- Set CSS Class
|
||||
if ( $counter % 2 == 0 )
|
||||
$content['syslogmessages'][$counter]['cssclass'] = "line1";
|
||||
$content['syslogmessages'][$counter]['cssclass'] = "line1_".$logArray[SYSLOG_SEVERITY];
|
||||
else
|
||||
$content['syslogmessages'][$counter]['cssclass'] = "line2";
|
||||
$content['syslogmessages'][$counter]['cssclass'] = "line2_".$logArray[SYSLOG_SEVERITY];
|
||||
// ---
|
||||
|
||||
// --- Copy other needed properties
|
||||
|
@ -25,7 +25,7 @@ a:link,a:active,a:visited,a.postlink
|
||||
text-decoration:none;
|
||||
|
||||
background-color: transparent;
|
||||
color:#005989;
|
||||
color:#ffffff;
|
||||
}
|
||||
a:hover
|
||||
{
|
||||
@ -157,6 +157,52 @@ font
|
||||
}
|
||||
|
||||
/* Cells for listening */
|
||||
/*emergency*/
|
||||
.line1_0 { color: #ffffff; background-color: #840A15;}
|
||||
.line1_0:hover { background-color:#ed1224;}
|
||||
.line2_0{ color: #ffffff; background-color: #be0e1d;}
|
||||
.line2_0:hover {background-color:#f8a0a7; }
|
||||
/*alert*/
|
||||
.line1_1 { color: #ffffff; background-color: #BA0716;}
|
||||
.line1_1:hover { background-color:#f6091d;}
|
||||
.line2_1{ color: #ffffff; background-color: #dd081a;}
|
||||
.line2_1:hover {background-color:#fa6b77; }
|
||||
/*critical*/
|
||||
.line1_2 { color: #ffffff; background-color: #CE0819;}
|
||||
.line1_2:hover { background-color:#fa6b77;}
|
||||
.line2_2{ color: #ffffff; background-color: #f83a4a;}
|
||||
.line2_2:hover {background-color:#fcb5bb; }
|
||||
/*error*/
|
||||
.line1_3 { color: #ffffff; background-color: #BB0A1F;}
|
||||
.line1_3:hover { background-color:#fa9ea9;}
|
||||
.line2_3{ color: #ffffff; background-color: #f20d28;}
|
||||
.line2_3:hover {background-color:#fa9ea9; }
|
||||
/*warning*/
|
||||
.line1_4 { color: #000000; background-color: #EF8200;}
|
||||
.line1_4:hover { background-color:#ffa333;}
|
||||
.line2_4{ color: #000000; background-color: #ff8c00;}
|
||||
.line2_4:hover {background-color:#ffc680; }
|
||||
/*notice*/
|
||||
.line1_5 { color: #000000; background-color: #14AD42;}
|
||||
.line1_5:hover { background-color:#32e768;}
|
||||
.line2_5{ color: #000000; background-color: #18cd4e;}
|
||||
.line2_5:hover {background-color:#76ef9a; }
|
||||
/*info*/
|
||||
.line1_6 { color: #000000; background-color: #0C9C91;}
|
||||
.line1_6:hover { background-color:#2aefde;}
|
||||
.line2_6{ color: #000000; background-color: #0ebeaf;}
|
||||
.line2_6:hover {background-color:#2aefde; }
|
||||
/*debug*/
|
||||
.line1_7 { color: #000000; background-color: #666699;}
|
||||
.line1_7:hover { background-color:#a3a3c2;}
|
||||
.line2_7{ color: #000000; background-color: #8585ad;}
|
||||
.line2_7:hover {background-color:#a3a3c2; }
|
||||
/*trace*/
|
||||
.line1_8 { color: #000000; background-color: #c2c2c0;}
|
||||
.line1_8:hover { background-color:#dadad8;}
|
||||
.line2_8{ color: #000000; background-color: #cdcdcb;}
|
||||
.line2_8:hover {background-color:#f3f3f2; }
|
||||
|
||||
.line0
|
||||
{
|
||||
color: #000000;
|
||||
|
Loading…
x
Reference in New Issue
Block a user