NAME

centaurilog - A KDE/Konqueror based Logfile Viewer

SYNOPSIS (COMMANDLINE)

centaurilog [--nocheck] [--profile name] [--query urlargs]
centaurilog --setup

SYNOPSIS (KONQUEROR URL)

cgi:centaurilog

DESCRIPTION

(I) One usage of this script is to launch Konqueror to display a query form and Logfile views. This behaviour can be modified using the options explained below. Javascript and CSS are used to present the data as a tree (organised by day) where nodes get automatically collapsed and expanded as you click on them.

- It is important to know that KDE's CGI kioslave is used to run the script; and CGI needs to know the directory where to find centaurilog. When launched via this script normally a check is made to see if CGI needs configuration. If so the directory path is added to the configuration on a per user base. This feature can be disabled using the --nocheck option.

- The automatic CGI configuration does not work when the script is called via an url from inside Konqueror. You can run the script from a console using the --setup option to solve this problem. Alternatively KDE kcontrol can be used (search for cgi) or your can run kcmshell kcmcgi from a console.

(II) Another way to use the script is to run it as a real CGI script via apache. Just copy it into a configured CGI folder. Consider protecting this CGI folder with a password - not everybody should be able to browse log messages.

The use of sudo

Usually the executing user will not have sufficient rights to read log files. When this happens either sudo or kdesu will be called. The later should be configured to use sudo as backend. You might want to edit /etc/sudoers and add the following line:

 www-data,%adm ALL=NOPASSWD: /usr/local/share/centauritools/centaurilog sudo *

This will allow the script to run as real CGI via apache (as user www-data). The group %adm stands here just as an example for the kio slave invokation. You can specify a list of users and/or groups that are allowed to see log messages without having to enter a password.

OPTIONS

--setup

do the KDE CGI setup for this user and quit

--nocheck

do not check if --setup was run before

--profile

konqueror profile, use '' to override the default 'centaurilog'

--query

url-encoded query arguments passed to konqueror

--help

show this text and quit

THE QUERY FORM

Initially a query form should get shown. It allows the selection of input files and the filtering for content.

Log file selection

Some checkboxes allow to select the log files to be parsed. Only files that exist and that can be seen from the current user are shown.

The 'max. Entry Count' input field allows to decrease or to increase the default limit of 10.000 lines.

Content filtering

The 'Select a Computer' field takes a regular expression and can be something like 'mycomputer', 'alpha[7-9]' or '(hugo|emil|egon)'. If empty no filtering on computer names is done. Remark: this only makes sense if you use syslogd in network mode (when other computers foreward their log messages to your syslogd).

The 'Filter on Words' field takes a space separated list of words which then select or deselect log file entries (depending on the 'Exclude' checkbox). When left empty no filtering takes place. Filtering is not case sensitive and is not based on regular expressions (see grep -F).

Remark: The backslash character should be used instead of the space char if a filter phrase contains spaces (example: 'page\fault').

BUGS AND LIMITS

CGI kioslave bug up to KDE 3.5.3

Occasionally extra spaces that get erroneously inserted into the output break the HTML formatting. The problem got fixed in later KDE releases.

Only 'messages', 'errors' and 'mail' logs can be viewed

For a more complex syslog configuration the script would need to be modified to allow other log files to be viewed. Remark: only the syslogd format can be parsed.

Root password not remembered

When the user has no read access to the log files kdesu is used to prompt for the root password. Unfortunately remembering the password does not work. A solution might be to add the user to a group that has read access to the log files (adm in the Debian case).

For very large log files: HTML rendering takes too long

This is a fundamental problem. For more than a few thousand entries the HTML rendering may take a while. For this reason the default max-line limit of 10.000 lines is set.

FILES

$HOME/centaurilog.conf

Your personal configuration file, see /etc/centaurilog.conf

/etc/centaurilog.conf

Configuration file that can contain input defaulst and CSS definitions.

$HOME/.kde/shared/apps/konqueror/profiles/centaurilog

You can save (or install) a konqueror profile that is used by centaurilog. See the examples folder in the documentation.

/var/log/messages /var/log/messages.0
/var/log/errors /var/log/errors.0
/var/log/mail /var/log/mail.0

Syslog files that get analyzed.

SEE ALSO

syslogd(8) syslog.conf(5) grep(1)

COPYRIGHT

centaurilog (C) 2006-2007 Dr. Juergen Pfennig

This software is published under a BSD style license and has been written for educational purposes only, no warranties! Try it at your own risk.