[Lugge] [Fwd: Ultimo giochino che ho fatto]

  • From: "Roberto A. F." <robang@xxxxxxxxx>
  • To: lugge@xxxxxxxxxxxxx
  • Date: Tue, 08 Jan 2002 14:11:14 +0100

-------- Original Message --------
Subject: Ultimo giochino che ho fatto
Date: Sat,  5 Jan 2002 13:16:04 +0100 (CET)
From: deneb@xxxxxxxxxxxxxx (Giorgio Zoppi)
To: robang@xxxxxxxxx

James Bond Log (JBL)

What is James Bond Log?

James Bond Log is a log daemon watcher, which checks for you your logs, 
giving some perl regular
expression patterns. It regulary (every minute) checks the log (i.e. 
/var/log/messages), set the offset file
in its own directory, and search for pattern matching specified in the 
Configfile's syntax  is:

pattern Some match

   Actually between startmatch and endmatch are implemented the follow 

   emailto mailaddress
   subject mail subject

   Other action will be implemented:


   James Bond Log must be runned by root and must EXIST a user for working.
   JBL drops immediatly root privileges and switch to that user, so 
after installing
   one must do (for example):

   grouadd -g 900 jbl
   useradd -g 900 -u 900 jbl

   Then create james bond log dir:

   mkdir /var/spool/bondlog
   chown jbl /var/spool/bondlog
   chmod 700 jbl /var/spool/bondlog

   Now  we can customize our configfile, suppose to put our 
configuration in /etc/bondlog.conf
   and we want to check /var/log/syslog

   We wanna be sure that /var/log/syslog has correct permission for read.

   chmod 640 /var/log/syslog
   chgrp jbl /var/log/syslog

   Now we can start bondlog:

   bondlog -c /etc/bondlog.conf -l /var/log/syslog -u 900 -g 900

   Done !

   bondlog 0.1
    bondlog [-c configfile] [-t chrootdir] [-m mailhost] [-l logfile] -u 
userid -g groupid

   Option needed :

   -c configuration file
   -u user to switch
   -g group to switch

   JBL has default that can be changed in the file bondlog.h provided 
with the source code.


     do a simple:


   then copy the bondlog executable where you prefer.

   For further development see 

Giorgio Zoppi

    ,__    ,_     ,___   .-------=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-.
    ||_)   ||\    ||_   /      Proud Member & Master of the LUGGE   |
    || \   ||¯\   ||¯     linuxgrp: http://lugge.ziobudda.net       |
    ¯¯  ¯° ¯¯  ¯° ¯¯  °   homepage: http://digilander.iol.it/robang |
\  Roberto A. Foglietta  reg num : #219348 by the Linux Counter    |

 Prima di scrivere in m-list per favore leggi il regolamento

Other related posts:

  • » [Lugge] [Fwd: Ultimo giochino che ho fatto]