Logmonster.conf

From The Network People, Inc. - Wiki
Jump to navigation Jump to search

Sample Logmonster.conf from version 3.01

#
# $Id: logmonster.conf 501 2006-10-02 22:31:20Z matt $
#
# Logmonster configuration file

##
# Logbase - path to Apache logs. Logmonster will figure out exactly where your
#           logs are based upon $logbase and a combination of the date you are 
#           processing files for. 
#
#           You are expected to be using cronolog so that log files for a given 
#           period are in a single file, easily found programatically. The easiest
#           way to do this is with cronolog. Apache recommends using it:
#
#           http://httpd.apache.org/docs/misc/FAQ-I.html#rotate
#
#           Apache 2.0 expands cronolog support by allowing ErrorLogs to be
#           piped to cronolog as well.
##

logbase   = /var/log/http

##
# log file owner - the user and group that owns the Apache log files
##

log_user  = www
log_group = www

##
# tmpdir - the place where logmonster can create temp files. Make sure this
#          directory exists.
##

tmpdir    = /var/log/http/tmp

##
# statsdir - directory in DocumentRoot where stats are to be stored. This
#            should be in the form "stats" or some other word like it. If
#            the VirtulHost DocumentRoot is "/home/example.com/html", then
#            the stats dir would be "/home/example.com/html/stats". This
#            directory must be writable by the user Logmonster runs as.
#
# statsdir = stats   # default
# 
#            If the stats directory is fully qualified (begins with a /),
#            then logmonster will dump stats into a directory that matches
#            the vhost name within the given directory. Example:
# statsdir = /www/docroot/stats
#            For the above setting, stats would be output to this directory:
#            /www/docroot/stats/example.com
#            Just like with a normal stats directory, if the directory does
#            not exist for the virtual domain, then logmonster will skip 
#            processing for that vhost.
##

statsdir  = stats

##
# statsdir_policy - what to do if the stats dir does not exist
#
#  exists - only update their stats if the stats dir exists (default)
#  create - if the stats dir does not exist, create it
##

statsdir_policy = exists

##
# userlogs - some users want access to their raw HTTP logs. If you host
#            their site on multiple servers and log directly to their home
#            directory (from each server), they end up with several log
#            files, not in sequential order, and log processors can't deal
#            with that. Instead, send the logs off to /var/log/apache and
#            at the end of each period, Logmonster will collect the logs
#            from each server, merge them, feed them through the processor
#            of your choice, and then drop the logs into the userlogs dir
#            within DocumentRoot.
#
#            I would recommend putting the userlogs outside the DocumentRoot
#            eg ../logs (Yes it works) so the logs are inaccessible via http.
#            --Gernot Hueber
##

userlogs  = logs

##
# access - What your http access logs are named. This needs to match the 
#          filename given in the CustomLog directive of httpd.conf
##

access    = access.log

##
# error  - What your http error logs are named. This needs to match the 
#          filename given in the ErrorLog directive of httpd.conf
##

error     = error.log

##
# vhost -  This is where Logmonster learns about your Apache vhosts. If
#          you list them in your httpd.conf, then this should be set to
#          the full path of your httpd.conf file. 
#
#              vhost = /usr/local/etc/apache/httpd.conf
#
#          If you use a include directory for your vhosts, then this
#          should be the full path to that directory.
#
#              vhost = /usr/local/etc/apache/vhosts
##
#vhost     = /etc/httpd/vhosts              # darwin
#vhost     = /var/www/vhosts                # linux
#vhost     = /usr/local/etc/apache/Includes # freebsd

vhost     = /usr/local/etc/lighttpd.conf

##
# processor - Which log file processor to feed the logs through. Currently,
#             webalizer, http-analzye, and awstats are supported.
#
#             This is the default processor and can be overridden for each
#             virtualhost/domain by placing a .processor file in the stats
#             dir. The files first line must be the name of the
#             processor: awstats, http-analyze, or webalizer.
## 

processor = awstats

##
# hosts  - a space delimited list of the hostname(s) of your web servers. 
#          Logmonster will retrieve the log files from each server. In order
#          to retrieve logs from remote servers, you must make sure ssh key
#          based authentication is set up between the machine you are 
#          running logmonster on and your log/web servers.
##
#hosts     = localhost lab.simerson.net seattle.simerson.net

hosts     = localhost

##
# Countlog - is a binary value, 0 = off, 1 = on. If enabled, logmonster will
#            Write hit counts to a count file in the same directory as your
#            Apache logs. This feature integrates nicely with RRDUtil to 
#            graph web hits for domains over extended periods of time. 
#
#              See http://www.tnpi.biz/internet/manage/rrdutil/
##

CountLog  = 1

##
# clean - Logmonster creates a bunch of scratch files in tmpdir while it's
#         working. If you set clean to 0 (default = 1) then it'll leave the
#         temp files behind. This is useful when I'm debugging, and you
#         might find it useful as well.
##

clean  = 1