Git Product home page Git Product logo

piperlog's Introduction

The typical use of the piperlog and logmerge packages is to regularly provide
summaries of the system logs by email.  The packages don't force a default
setup for this, so here's a example.

First, we need to produce the file of patterns to ignore.  This can be produced
from an existing logcheck installation.  It uses the "discard" file in
/etc/piperlog/discard to get rid of logcheck patterns that you don't want.

  piper:~# piperlog-mkignore > /etc/piperlog/ignore

We add a new user, initialise the "offsets" file which tells logmerge where to
start reading the logs from (and which logs to read) and set up a cron job to
generate the summaries.

  piper:~# adduser --system --ingroup adm piperlog
  Adding system user `piperlog'...
  Adding new user `piperlog' (101) with group `adm'.
  Creating home directory `/home/piperlog'.
  piper:~# logmerge-mkoffsets /var/log/auth.log /var/log/syslog > /var/lib/logmerge/offsets
  piper:~# chown -R piperlog.adm /var/lib/logmerge/
  piper:~# crontab -e -u piperlog /etc/piperlog/ignore

  5 */4 * * * ([email protected]; export REPLYTO; logmerge | piperlog | mail -s "some.example.com log summary at `date`" [email protected])


Minor points:
  - piperlog uses pcre "Perl compatible" regular expressions (see
    pcrepattern(1)) rather than egrep "extended" regular expressions.
    There are few differences.  I found that the \< and \> word end sequences
    are not present, and repetitions are fussy about the preceeding part of
    the regexp (eg., r+{2,3} is not allowed).  In the logcheck rules I looked
    at these were only used by mistake, so they don't matter.

piperlog's People

Contributors

bacam avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.