Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:loganalyzer

LogAnalyzer

Die Webanwendung phpLogCon war eine Anwendung z.B. zum betrachten von Syslog-Einträgen welche z.B. durch RSyslog in eine MySQL-Datenbank geschrieben werden.

Die Webanwendung LogAnalyzer ist der Nachfolger von phpLogCon.

:!: Daher ist der Austausch des standardmäßig unter CentOS verwendeten „alten“ Syslog-Daemons mit dem Namen syslogd bzw. klogd durch den RSyslog-Daemon mit den Namen rsyslogd zwingend für den Einsatz von phpLogCon / LogAnalyzer erforderlich, da der „alte“ Syslog-Daemon mit dem Namen syslogd z.B. nicht die Fähigkeit besitzt, in eine Datenbank wie MySQL Log-Informationen zu schreiben!

Voraussetzungen

Als Voraussetzung für die Installation von phpLogCon / LogAnalyzer sind folgende Komponenten erforderlich:

Herunterladen

Bevor mit der Installation von phpLogCon / LogAnalyzer begonnen werden kann, sollte eine „stabile“ Version von phpLogCon / LogAnalyzer heruntergeladen werden.

Die aktuelle letzte Version ist die Version loganalyzer-3.0.0.

Installation

Nach dem herunterladen einer Version von LogAnalyzer in z.B. das Verzeichnis /tmp auf den lokalen Rechner, sollte sich folgende Datei

loganalyzer-3.0.0.tar.gz
im Verzeichnis /tmp befinden.

Das heruntergeladene Archiv mit dem Namen loganalyzer-3.0.0.tar.gz kann mit folgendem Befehl entpackt werden:

$ tar xvfz loganalyzer-3.0.0.tar.gz

Anschließend sollte sich ein Verzeichnis mit dem Namen loganalyzer-3.0.0 im Verzeichnis /tmp befinden:

Daraufhin sollte der relevante Teil des Verzeichnises /tmp/loganalyzer-3.0.0/src in das DocumentRoot-Verzeichnis des Apache HTTP Server's mit folgendem Befehl verschoben:

$ mv /tmp/loganalyzer-3.0.0/src /var/www/html/loganalyzer

Abschliessend kann das heruntergeladene Archiv loganalyzer-3.0.0.tar.gz mit folgendem Befehl gelöscht werden:

$ rm /tmp/loganalyzer-3.0.0.tar.gz

Mit nachfolgendem Befehl kann kontrolliert werden, ob sich das Verzeichnis loganalyzer wirklich im Verzeichnis /var/www/html befindet:

$ ll /var/www/html
total 32
drwxr-xr-x 14 1000   1000 4096 Mar 29 16:14 loganalyzer

Es fehlen nun noch die entsprechenden „Dateirechte“ an dem Verzeichnis /var/www/html/loganalyzer, welche durch zwei shell-Scripte die sich im Verzeichnis /tmp/loganalyzer-3.0.0/contrib befinden gesetzt werden sollten. Um diese shell-Scripte zum Einsatz bringen zu können, sollten diese mit folgendem Befehl in das DocumentRoot-Verzeichnis des Apache HTTP Server's kopiert werden:

$ cp /tmp/loganalyzer-3.0.0/contrib/*.sh /var/www/html/loganalyzer

Zur Überprüfung, ob die shell-Scripte sich auch im Verzeichnis /var/www/html/loganalyzer befinden, kann folgender Befehl genutzt werden (configure.sh und secure.sh):

$ ll /var/www/html/loganalyzer
total 240
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 admin
-rw-r--r-- 1 1000 1000  5297 Mar 29 16:10 asktheoracle.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 BitstreamVeraFonts
-rw-r--r-- 1 1000 1000 17164 Mar 29 16:10 chartgenerator.php
drwxr-xr-x 6 1000 1000  4096 Mar 29 16:10 classes
-rw-r--r-- 1 root root    49 Apr 17 11:05 configure.sh
-rw-r--r-- 1 1000 1000  9037 Mar 29 16:10 convert.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 cron
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 css
-rw-r--r-- 1 1000 1000 14947 Mar 29 16:10 details.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:14 doc
-rw-r--r-- 1 1000 1000 12580 Mar 29 16:10 export.php
drwxr-xr-x 5 1000 1000  4096 Mar 29 16:10 images
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 include
-rw-r--r-- 1 1000 1000 37643 Mar 29 16:10 index.php
-rw-r--r-- 1 1000 1000 33310 Mar 29 16:10 install.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 js
drwxr-xr-x 6 1000 1000  4096 Mar 29 16:10 lang
-rw-r--r-- 1 1000 1000  3100 Mar 29 16:10 login.php
-rw-r--r-- 1 1000 1000  6590 Mar 29 16:10 reportgenerator.php
-rw-r--r-- 1 1000 1000  9270 Mar 29 16:10 search.php
-rw-r--r-- 1 root root    31 Apr 17 11:05 secure.sh
-rw-r--r-- 1 1000 1000  4449 Mar 29 16:10 statistics.php
drwxr-xr-x 3 1000 1000  4096 Mar 29 16:10 templates
drwxr-xr-x 4 1000 1000  4096 Mar 29 16:10 themes
-rw-r--r-- 1 1000 1000  3194 Mar 29 16:10 userchange.php

Ab hier werden root-Rechte zur Ausführung der nachfolgenden Befehle benötigt. Um root zu werden geben Sie bitte folgenden Befehl ein:

$ su -
Password: 

Um die shell-Scripte /var/www/html/loganalyzer/configure.sh und /var/www/html/loganalyzer/secure.sh auch ausführen zu können, müssen die entsprechenden Rechte zur Ausführung mit folgendem Befehl noch gesetzt werden:

# chmod u+x /var/www/html/loganalyzer/*.sh

Eine Überprüfung, ob die Rechte richtig gesetzt wurden, kann mit folgendem Befehl erfolgen:

# ll /var/www/html/loganalyzer
total 240
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 admin
-rw-r--r-- 1 1000 1000  5297 Mar 29 16:10 asktheoracle.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 BitstreamVeraFonts
-rw-r--r-- 1 1000 1000 17164 Mar 29 16:10 chartgenerator.php
drwxr-xr-x 6 1000 1000  4096 Mar 29 16:10 classes
-rwxr--r-- 1 root root    49 Apr 17 11:05 configure.sh
-rw-r--r-- 1 1000 1000  9037 Mar 29 16:10 convert.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 cron
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 css
-rw-r--r-- 1 1000 1000 14947 Mar 29 16:10 details.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:14 doc
-rw-r--r-- 1 1000 1000 12580 Mar 29 16:10 export.php
drwxr-xr-x 5 1000 1000  4096 Mar 29 16:10 images
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 include
-rw-r--r-- 1 1000 1000 37643 Mar 29 16:10 index.php
-rw-r--r-- 1 1000 1000 33310 Mar 29 16:10 install.php
drwxr-xr-x 2 1000 1000  4096 Mar 29 16:10 js
drwxr-xr-x 6 1000 1000  4096 Mar 29 16:10 lang
-rw-r--r-- 1 1000 1000  3100 Mar 29 16:10 login.php
-rw-r--r-- 1 1000 1000  6590 Mar 29 16:10 reportgenerator.php
-rw-r--r-- 1 1000 1000  9270 Mar 29 16:10 search.php
-rwxr--r-- 1 root root    31 Apr 17 11:05 secure.sh
-rw-r--r-- 1 1000 1000  4449 Mar 29 16:10 statistics.php
drwxr-xr-x 3 1000 1000  4096 Mar 29 16:10 templates
drwxr-xr-x 4 1000 1000  4096 Mar 29 16:10 themes
-rw-r--r-- 1 1000 1000  3194 Mar 29 16:10 userchange.php

Ein Wechsel in das Verzeichnis /var/www/html/loganalyzer wird mit folgendem Befehl realisiert:

# cd /var/www/html/loganalyzer

Jetzt können beide shell-Scripte wie folgt ausgeführt werden:

./configure.sh
./secure.sh

Am Ende der Installation, müssen noch die entsprechenden „Besitzrechte“ mit folgendem Befehl gesetzt werden:

# chown -R root:apache /var/www/html/loganalyzer

Danach können beide shell-Scripte wieder mit folgendem Befehl gelöschte werden:

# rm /var/www/html/loganalyzer/*.sh
rm: remove regular file `/var/www/html/loganalyzer/configure.sh'? y
rm: remove regular file `/var/www/html/loganalyzer/secure.sh'? y

Konfiguration

Nun befindet sich im Verzeichnis /tmp/loganalyzer-3.0.0 eine Datei mit dem Namen INSTALL, worin alle notwendigen Schritte (in Englisch) erklärt sind, um LogAnalyzer zu installieren und zu konfigurieren.

Dei Web-Anwendung LogAnalyzer beinhaltet einen Installationsprozess, welcher unter folgender URL aufrufbar sein sollte: http://localhost/loganalyzer/install.php.

Als Ergebnis dieses Installationsprozesses, wird folgende Datei erstellt:

/var/www/html/loganalyzer/config.php
welche alle notwendigen Konfigurationen enthält.

Konfiguration einer Quelle

:!: WICHTIG - Dazu ist jedoch temporär bzw. kurzfristig folgende Anpassung notwendig:

# chmod 664 /var/www/html/loganalyzer/config.php

Der Inhalt der Konfigurationsdatei für LogAnalyzer könnte wie folgt aussehen:

<?php
/*
        *********************************************************************
        * LogAnalyzer - http://loganalyzer.adiscon.com
        * -----------------------------------------------------------------
        * Main Configuration File
        *
        * -> Configuration need variables for the Database connection
        *
        * Copyright (C) 2008-2010 Adiscon GmbH.
        *
        * This file is part of LogAnalyzer.
        *
        * LogAnalyzer is free software: you can redistribute it and/or modify
        * it under the terms of the GNU General Public License as published by
        * the Free Software Foundation, either version 3 of the License, or
        * (at your option) any later version.
        *
        * LogAnalyzer is distributed in the hope that it will be useful,
        * but WITHOUT ANY WARRANTY; without even the implied warranty of
        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        * GNU General Public License for more details.
        *
        * You should have received a copy of the GNU General Public License
        * along with LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
        *
        * A copy of the GPL can be found in the file "COPYING" in this
        * distribution.
        *********************************************************************
*/
 
// --- Avoid directly accessing this file! 
if ( !defined('IN_PHPLOGCON') )
{
        die('Hacking attempt');
        exit;
}
// --- 
 
// --- UserDB options
/*      If UserDB is enabled, all options will and have to be configured in the database. 
*       All Options below the UserDB options here will not be used, unless a setting
*       is missing in the database. 
*/
$CFG['UserDBEnabled'] = true;
$CFG['UserDBServer'] = 'localhost';
$CFG['UserDBPort'] = 3306;
$CFG['UserDBName'] = 'loganalyzer'; 
$CFG['UserDBPref'] = 'logcon_'; 
$CFG['UserDBUser'] = 'user';
$CFG['UserDBPass'] = 'geheim';
$CFG['UserDBLoginRequired'] = true;
// --- 
 
// --- Misc Options
$CFG['MiscShowDebugMsg'] = 0;                           // if enabled, you will get additional output on certain places
$CFG['MiscDebugToSyslog'] = 0;                          // if enabled, debug messages from LogAnalyzer will be send to syslog on linux, and into the EventLog on Windows
$CFG['MiscShowDebugGridCounter'] = 0;           // Only for debugging purposes, will add a counter column into the grid!
$CFG["MiscShowPageRenderStats"] = 1;            // If enabled, you will see Pagerender Settings
$CFG['MiscEnableGzipCompression'] = 1;          // If enabled, LogAnalyzer will use gzip compression for output, we recommend
                                                                                        // to have this option enabled, it will highly reduce bandwith usage. 
# Tachtler
# default: $CFG['MiscMaxExecutionTime'] = 30;                   // LogAnalyzer will try to overwrite the default script timeout with this value during runtime!
$CFG['MiscMaxExecutionTime'] = 60;                      // LogAnalyzer will try to overwrite the default script timeout with this value during runtime!
                                                                                        // This can of course only work if LogAnalyzer is allowed to changed the script timeout. 
# Tachtler
# default: $CFG['DebugUserLogin'] = 0;                                  // if enabled, you will see additional informations on failed logins
$CFG['DebugUserLogin'] = 1;                                     // if enabled, you will see additional informations on failed logins
// --- 
 
// --- Default Frontend Options 
# Tachtler
# default: $CFG['PrependTitle'] = "";                                   // If set, this text will be prepended withint the title tag
$CFG['PrependTitle'] = "tachtler.net";                                      // If set, this text will be prepended withint the title tag
$CFG['ViewUseTodayYesterday'] = 1;                      // If enabled, the date from today and yesterday is displayed as "today" and "yesterday"
$CFG['ViewMessageCharacterLimit'] = 80;         // Default character limit for the message gets trunscated! 0 means NO trunscation.
$CFG['ViewStringCharacterLimit'] = 30;          // Default character limit for all other string type fields before they get trunscated! 0 means NO trunscation.
$CFG['ViewEntriesPerPage'] = 50;                        // Default number of syslog entries shown per page
$CFG['ViewEnableDetailPopups'] = 1;                     // If enabled, you will see additional Details for each syslog message on mouse over. 
$CFG['ViewDefaultTheme'] = "default";           // This sets the default theme the user is going to see when he opens LogAnalyzer the first time. 
                                                                                        // Currently only "default" and "dark" are available. 
# Tachtler
# default: $CFG['ViewDefaultLanguage'] = "en";                  // Sets the default display language
$CFG['ViewDefaultLanguage'] = "de";                     // Sets the default display language
$CFG['ViewEnableAutoReloadSeconds'] = 0;        // If "ViewEnableAutoReloadSeconds" is set to anything higher the 0 (which means disabled), this means auto reload is enabled by default. 
 
# Tachtler
# default: $CFG['SearchCustomButtonCaption'] = "I'd like to feel sad";  // Default caption for the custom fast search button
$CFG['SearchCustomButtonCaption'] = "Schnellsuche Problem-Meldungen";   // Default caption for the custom fast search button
# Tachtler
# default: $CFG['SearchCustomButtonSearch'] = "error";                                  // Default search string for the custom search button
$CFG['SearchCustomButtonSearch'] = "severity:0,1,2,3,4";                                        // Default search string for the custom search button
 
# Tachtler
# default: $CFG['EnableIPAddressResolve'] = 1;                  // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
$CFG['EnableIPAddressResolve'] = 0;                     // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
$CFG['SuppressDuplicatedMessages'] = 0;         // If enabled, duplicated messages will be suppressed in the main display. 
$CFG['TreatNotFoundFiltersAsTrue'] = 0;         // If you filter / search for messages, and the fields you are filtering for is not found, the filter result is treaten as TRUE! 
$CFG['PopupMenuTimeout'] = 3000;                        // This variable defines the default timeout value for popup menus in milliseconds. (those menus which popup when you click on the value of a field.
$CFG['PhplogconLogoUrl'] = "";                          // Put an Url to a custom toplogo you want to use.
# Tachtler
# default: $CFG['InlineOnlineSearchIcons'] = 1;            // Show online search icons
$CFG['InlineOnlineSearchIcons'] = 0;            // Show online search icons
// ---
 
// --- Custom HTML Code 
$CFG['InjectHtmlHeader'] = "";                          // Use this variable to inject custom html into the html <head> area!
$CFG['InjectBodyHeader'] = "";                          // Use this variable to inject custom html into the begin of the <body> area!
$CFG['InjectBodyFooter'] = "";                          // Use this variable to inject custom html into the end of the <body> area!
// ---
 
// --- Define which fields you want to see 
//$CFG['ShowMessage'] = true;                                   // If enabled, the Message column will be appended to the columns list.
//Eventlog based fields: $CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_HOST, SYSLOG_EVENT_LOGTYPE, SYSLOG_EVENT_SOURCE, /*SYSLOG_EVENT_CATEGORY, */SYSLOG_EVENT_ID, SYSLOG_MESSAGE );
//$CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_FACILITY, SYSLOG_SEVERITY, SYSLOG_HOST, SYSLOG_SYSLOGTAG, SYSLOG_MESSAGETYPE, SYSLOG_MESSAGE );
$CFG['DefaultViewsID'] = "";
// ---
 
// --- Predefined Searches! 
$CFG['Search'][] = array ( "DisplayName" => "Syslog Warnings and Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3%2C4&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "Syslog Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from the last hour", "SearchQuery" => "filter=datelastx%3A1&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 12 hours", "SearchQuery" => "filter=datelastx%3A2&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 24 hours", "SearchQuery" => "filter=datelastx%3A3&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 7 days", "SearchQuery" => "filter=datelastx%3A4&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 31 days", "SearchQuery" => "filter=datelastx%3A5&search=Search" );
// $CFG['Search'][] = array ( "DisplayName" => "", "SearchQuery" => "" );
// ---
 
// --- Predefined Charts!
$CFG['Charts'][] = array ( "DisplayName" => "Top Hosts", "chart_type" => CHART_BARS_HORIZONTAL, "chart_width" => 400, "chart_field" => SYSLOG_HOST, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "SyslogTags", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_SYSLOGTAG, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "Severity Occurences", "chart_type" => CHART_BARS_VERTICAL, "chart_width" => 400, "chart_field" => SYSLOG_SEVERITY, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "Usage by Day", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_DATE, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
// ---
 
// --- Source Options
/* Example for DiskType Source:
        $CFG['Sources']['Source1']['ID'] = "Source1";
        $CFG['Sources']['Source1']['Name'] = "Syslog Disk File";
        $CFG['Sources']['Source1']['Description'] = "More details you want to see about this source";
        $CFG['Sources']['Source1']['SourceType'] = SOURCE_DISK;
        $CFG['Sources']['Source1']['LogLineType'] = "syslog";
        $CFG['Sources']['Source1']['MsgParserList'] = "";
        $CFG['Sources']['Source1']['MsgNormalize'] = 0;
        $CFG['Sources']['Source1']['DiskFile'] = "/var/log/syslog";
        $CFG['Sources']['Source1']['ViewID'] = "SYSLOG";
 
        $CFG['Sources']['Source2']['ID'] = "Source5";
        $CFG['Sources']['Source2']['Name'] = "WinSyslog DB";
        $CFG['Sources']['Source1']['Description'] = "";
        $CFG['Sources']['Source2']['SourceType'] = SOURCE_DB;
        $CFG['Sources']['Source1']['MsgParserList'] = "";
        $CFG['Sources']['Source2']['DBTableType'] = "winsyslog";
        $CFG['Sources']['Source2']['DBType'] = DB_MYSQL;
        $CFG['Sources']['Source2']['DBServer'] = "localhost";
        $CFG['Sources']['Source2']['DBName'] = "loganalyzer";
        $CFG['Sources']['Source2']['DBUser'] = "root";
        $CFG['Sources']['Source2']['DBPassword'] = "";
        $CFG['Sources']['Source2']['DBTableName'] = "systemevents";
        $CFG['Sources']['Source2']['ViewID'] = "SYSLOG";
*/
 
$CFG['DefaultSourceID'] = 'Source1';
 
$CFG['Sources']['Source1']['ID'] = 'Source1';
$CFG['Sources']['Source1']['Name'] = 'dbserver.tachtler.net';
$CFG['Sources']['Source1']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source1']['SourceType'] = SOURCE_DB;
$CFG['Sources']['Source1']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source1']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source1']['DBServer'] = 'localhost';
$CFG['Sources']['Source1']['DBName'] = 'loganalyzer';
$CFG['Sources']['Source1']['DBUser'] = 'user';
$CFG['Sources']['Source1']['DBPassword'] = 'geheim';
$CFG['Sources']['Source1']['DBTableName'] = 'SystemEvents';
$CFG['Sources']['Source1']['DBEnableRowCounting'] = false;
 
// --- 
 
?>

:!: WICHTIG - Abschließend ist die temporäre bzw. kurzfristige Anpassung wieder rückgängig zu machen:

# chmod 644 /var/www/html/loganalyzer/config.php

Konfiguration mehrere Quellen

:!: WICHTIG - Dazu ist jedoch temporär bzw. kurzfristig folgende Anpassung notwendig:

# chmod 664 /var/www/html/loganalyzer/config.php

Der Inhalt der Konfigurationsdatei für LogAnalyzer könnte wie folgt aussehen:

<?php
/*
        *********************************************************************
        * LogAnalyzer - http://loganalyzer.adiscon.com
        * -----------------------------------------------------------------
        * Main Configuration File
        *
        * -> Configuration need variables for the Database connection
        *
        * Copyright (C) 2008-2010 Adiscon GmbH.
        *
        * This file is part of LogAnalyzer.
        *
        * LogAnalyzer is free software: you can redistribute it and/or modify
        * it under the terms of the GNU General Public License as published by
        * the Free Software Foundation, either version 3 of the License, or
        * (at your option) any later version.
        *
        * LogAnalyzer is distributed in the hope that it will be useful,
        * but WITHOUT ANY WARRANTY; without even the implied warranty of
        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        * GNU General Public License for more details.
        *
        * You should have received a copy of the GNU General Public License
        * along with LogAnalyzer. If not, see <http://www.gnu.org/licenses/>.
        *
        * A copy of the GPL can be found in the file "COPYING" in this
        * distribution.
        *********************************************************************
*/
 
// --- Avoid directly accessing this file! 
if ( !defined('IN_PHPLOGCON') )
{
        die('Hacking attempt');
        exit;
}
// --- 
 
// --- UserDB options
/*      If UserDB is enabled, all options will and have to be configured in the database. 
*       All Options below the UserDB options here will not be used, unless a setting
*       is missing in the database. 
*/
$CFG['UserDBEnabled'] = true;
$CFG['UserDBServer'] = 'localhost';
$CFG['UserDBPort'] = 3306;
$CFG['UserDBName'] = 'loganalyzer'; 
$CFG['UserDBPref'] = 'logcon_'; 
$CFG['UserDBUser'] = 'user';
$CFG['UserDBPass'] = 'geheim';
$CFG['UserDBLoginRequired'] = true;
// --- 
 
// --- Misc Options
$CFG['MiscShowDebugMsg'] = 0;                           // if enabled, you will get additional output on certain places
$CFG['MiscDebugToSyslog'] = 0;                          // if enabled, debug messages from LogAnalyzer will be send to syslog on linux, and into the EventLog on Windows
$CFG['MiscShowDebugGridCounter'] = 0;           // Only for debugging purposes, will add a counter column into the grid!
$CFG["MiscShowPageRenderStats"] = 1;            // If enabled, you will see Pagerender Settings
$CFG['MiscEnableGzipCompression'] = 1;          // If enabled, LogAnalyzer will use gzip compression for output, we recommend
                                                                                        // to have this option enabled, it will highly reduce bandwith usage. 
// Tachtler
// default: $CFG['MiscMaxExecutionTime'] = 30;                  // LogAnalyzer will try to overwrite the default script timeout with this value during runtime!
$CFG['MiscMaxExecutionTime'] = 60;                      // LogAnalyzer will try to overwrite the default script timeout with this value during runtime!
                                                                                        // This can of course only work if LogAnalyzer is allowed to changed the script timeout. 
$CFG['DebugUserLogin'] = 0;                                     // if enabled, you will see additional informations on failed logins
// --- 
 
// --- Default Frontend Options 
// Tachtler
// default: $CFG['PrependTitle'] = "";                                  // If set, this text will be prepended withint the title tag
$CFG['PrependTitle'] = "nss.tachtler.net";                                      // If set, this text will be prepended withint the title tag
$CFG['ViewUseTodayYesterday'] = 1;                      // If enabled, the date from today and yesterday is displayed as "today" and "yesterday"
$CFG['ViewMessageCharacterLimit'] = 80;         // Default character limit for the message gets trunscated! 0 means NO trunscation.
$CFG['ViewStringCharacterLimit'] = 30;          // Default character limit for all other string type fields before they get trunscated! 0 means NO trunscation.
$CFG['ViewEntriesPerPage'] = 50;                        // Default number of syslog entries shown per page
// Tachtler
// $CFG['ViewEnableDetailPopups'] = 0;                  // If enabled, you will see additional Details for each syslog message on mouse over. 
$CFG['ViewEnableDetailPopups'] = 1;                     // If enabled, you will see additional Details for each syslog message on mouse over. 
$CFG['ViewDefaultTheme'] = "default";           // This sets the default theme the user is going to see when he opens LogAnalyzer the first time. 
                                                                                        // Currently only "default" and "dark" are available. 
// Tachtler
// default: $CFG['ViewDefaultLanguage'] = "en";                 // Sets the default display language
$CFG['ViewDefaultLanguage'] = "de";                     // Sets the default display language
$CFG['ViewEnableAutoReloadSeconds'] = 0;        // If "ViewEnableAutoReloadSeconds" is set to anything higher the 0 (which means disabled), this means auto reload is enabled by default. 
 
// Tachtler
// default: $CFG['SearchCustomButtonCaption'] = "I'd like to feel sad"; // Default caption for the custom fast search button
$CFG['SearchCustomButtonCaption'] = "Schnellsuche Problem-Meldungen";   // Default caption for the custom fast search button
// Tachtler
// default: $CFG['SearchCustomButtonSearch'] = "error";                                 // Default search string for the custom search button
$CFG['SearchCustomButtonSearch'] = "severity:0,1,2,3,4";                                        // Default search string for the custom search button
 
$CFG['EnableIPAddressResolve'] = 0;                     // If enabled, IP Addresses inline messages are automatically resolved and the result is added in brackets {} behind the IP Address
$CFG['SuppressDuplicatedMessages'] = 0;         // If enabled, duplicated messages will be suppressed in the main display. 
$CFG['TreatNotFoundFiltersAsTrue'] = 0;         // If you filter / search for messages, and the fields you are filtering for is not found, the filter result is treaten as TRUE! 
$CFG['PopupMenuTimeout'] = 3000;                        // This variable defines the default timeout value for popup menus in milliseconds. (those menus which popup when you click on the value of a field.
$CFG['PhplogconLogoUrl'] = "";                          // Put an Url to a custom toplogo you want to use.
// Tachtler
// default: $CFG['InlineOnlineSearchIcons'] = 1;                // Show online search icons
$CFG['InlineOnlineSearchIcons'] = 0;            // Show online search icons
$CFG['UseProxyServerForRemoteQueries'] = "";// If empty no proxy server will be used. If set to a proxy server url like 127.0.0.1:8080, LogAnalyzer will use this server for url queries like the updatecheck. 
// ---
 
// --- Custom HTML Code 
$CFG['InjectHtmlHeader'] = "";                          // Use this variable to inject custom html into the html <head> area!
$CFG['InjectBodyHeader'] = "";                          // Use this variable to inject custom html into the begin of the <body> area!
$CFG['InjectBodyFooter'] = "";                          // Use this variable to inject custom html into the end of the <body> area!
// ---
 
// --- Define which fields you want to see 
//$CFG['ShowMessage'] = true;                                   // If enabled, the Message column will be appended to the columns list.
//Eventlog based fields: $CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_HOST, SYSLOG_EVENT_LOGTYPE, SYSLOG_EVENT_SOURCE, /*SYSLOG_EVENT_CATEGORY, */SYSLOG_EVENT_ID, SYSLOG_MESSAGE );
//$CFG['Columns'] = array ( SYSLOG_DATE, SYSLOG_FACILITY, SYSLOG_SEVERITY, SYSLOG_HOST, SYSLOG_SYSLOGTAG, SYSLOG_MESSAGETYPE, SYSLOG_MESSAGE );
$CFG['DefaultViewsID'] = "";
// ---
 
// --- Predefined Searches! 
$CFG['Search'][] = array ( "DisplayName" => "Syslog Warnings and Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3%2C4&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "Syslog Errors", "SearchQuery" => "filter=severity%3A0%2C1%2C2%2C3&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from the last hour", "SearchQuery" => "filter=datelastx%3A1&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 12 hours", "SearchQuery" => "filter=datelastx%3A2&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 24 hours", "SearchQuery" => "filter=datelastx%3A3&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 7 days", "SearchQuery" => "filter=datelastx%3A4&search=Search" );
$CFG['Search'][] = array ( "DisplayName" => "All messages from last 31 days", "SearchQuery" => "filter=datelastx%3A5&search=Search" );
// $CFG['Search'][] = array ( "DisplayName" => "", "SearchQuery" => "" );
// ---
 
// --- Predefined Charts!
$CFG['Charts'][] = array ( "DisplayName" => "Top Hosts", "chart_type" => CHART_BARS_HORIZONTAL, "chart_width" => 400, "chart_field" => SYSLOG_HOST, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "SyslogTags", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_SYSLOGTAG, "maxrecords" => 10, "showpercent" => 0, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "Severity Occurences", "chart_type" => CHART_BARS_VERTICAL, "chart_width" => 400, "chart_field" => SYSLOG_SEVERITY, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
$CFG['Charts'][] = array ( "DisplayName" => "Usage by Day", "chart_type" => CHART_CAKE, "chart_width" => 400, "chart_field" => SYSLOG_DATE, "maxrecords" => 10, "showpercent" => 1, "chart_enabled" => 1 );
// ---
 
// --- Source Options
/* Example for DiskType Source:
        $CFG['Sources']['Source1']['ID'] = "Source1";
        $CFG['Sources']['Source1']['Name'] = "Syslog Disk File";
        $CFG['Sources']['Source1']['Description'] = "More details you want to see about this source";
        $CFG['Sources']['Source1']['SourceType'] = SOURCE_DISK;
        $CFG['Sources']['Source1']['LogLineType'] = "syslog";
        $CFG['Sources']['Source1']['MsgParserList'] = "";
        $CFG['Sources']['Source1']['MsgNormalize'] = 0;
        $CFG['Sources']['Source1']['DiskFile'] = "/var/log/syslog";
        $CFG['Sources']['Source1']['ViewID'] = "SYSLOG";
 
        $CFG['Sources']['Source2']['ID'] = "Source5";
        $CFG['Sources']['Source2']['Name'] = "WinSyslog DB";
        $CFG['Sources']['Source1']['Description'] = "";
        $CFG['Sources']['Source2']['SourceType'] = SOURCE_DB;
        $CFG['Sources']['Source1']['MsgParserList'] = "";
        $CFG['Sources']['Source2']['DBTableType'] = "winsyslog";
        $CFG['Sources']['Source2']['DBType'] = DB_MYSQL;
        $CFG['Sources']['Source2']['DBServer'] = "localhost";
        $CFG['Sources']['Source2']['DBName'] = "loganalyzer";
        $CFG['Sources']['Source2']['DBUser'] = "root";
        $CFG['Sources']['Source2']['DBPassword'] = "";
        $CFG['Sources']['Source2']['DBTableName'] = "systemevents";
        $CFG['Sources']['Source2']['ViewID'] = "SYSLOG";
*/
 
$CFG['DefaultSourceID'] = 'Source1';
 
$CFG['Sources']['Source1']['ID'] = 'Source1';
$CFG['Sources']['Source1']['Name'] = 'nss.tachtler.net';
$CFG['Sources']['Source1']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source1']['SourceType'] = SOURCE_DB;
$CFG['Sources']['Source1']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source1']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source1']['DBServer'] = 'localhost';
$CFG['Sources']['Source1']['DBName'] = 'loganalyzer';
$CFG['Sources']['Source1']['DBUser'] = 'user';
$CFG['Sources']['Source1']['DBPassword'] = 'geheim';
$CFG['Sources']['Source1']['DBTableName'] = 'SystemEvents';
$CFG['Sources']['Source1']['DBEnableRowCounting'] = false;
$CFG['Sources']['Source1']['defaultfilter'] = 'source:=nss';
 
$CFG['Sources']['Source2']['ID'] = 'Source2';
$CFG['Sources']['Source2']['Name'] = 'receiver.tachtler.net';
$CFG['Sources']['Source2']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source2']['SourceType'] = SOURCE_DB;
$CFG['Sources']['Source2']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source2']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source2']['DBServer'] = 'localhost';
$CFG['Sources']['Source2']['DBName'] = 'loganalyzer';
$CFG['Sources']['Source2']['DBUser'] = 'user';
$CFG['Sources']['Source2']['DBPassword'] = 'geheim';
$CFG['Sources']['Source2']['DBTableName'] = 'SystemEvents';
$CFG['Sources']['Source2']['DBEnableRowCounting'] = false;
$CFG['Sources']['Source2']['defaultfilter'] = 'source:=receiver';
 
$CFG['Sources']['Source3']['ID'] = 'Source3';
$CFG['Sources']['Source3']['Name'] = 'router.tachtler.net';
$CFG['Sources']['Source3']['ViewID'] = 'SYSLOG';
$CFG['Sources']['Source3']['SourceType'] = SOURCE_DB;
$CFG['Sources']['Source3']['DBTableType'] = 'monitorware';
$CFG['Sources']['Source3']['DBType'] = DB_MYSQL;
$CFG['Sources']['Source3']['DBServer'] = 'localhost';
$CFG['Sources']['Source3']['DBName'] = 'loganalyzer';
$CFG['Sources']['Source3']['DBUser'] = 'user';
$CFG['Sources']['Source3']['DBPassword'] = 'geheim';
$CFG['Sources']['Source3']['DBTableName'] = 'SystemEvents';
$CFG['Sources']['Source3']['DBEnableRowCounting'] = false;
$CFG['Sources']['Source3']['defaultfilter'] = 'source:=router';
 
// --- 
 
?>

:!: WICHTIG - Abschließend ist die temporäre bzw. kurzfristige Anpassung wieder rückgängig zu machen:

# chmod 644 /var/www/html/loganalyzer/config.php

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
tachtler/loganalyzer.txt · Zuletzt geändert: 2012/08/29 11:05 von klaus