"Fossies" - the Fresh Open Source Software Archive
Member "lmon-1.2/README" (19 May 2005, 5199 Bytes) of package /linux/privat/old/lmon-1.2.tgz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
4 LMon is a package for near real-time monitoring of logs, sending e-mail
5 alerts upon known (rule hits) or unknown data (rule misses).
9 - Buffer multiple rule hits within a given interval, cap at a given maximum
10 number of lines, wait for a given interval before sending next alert.
12 - Auto-discovery of log rotation.
14 - Simplicity. LMon can run from the command line without configuration, or
15 be controlled from a central configuration file with multiple instances
16 monitoring different log files/sending alerts to different people. It is very
17 much intended to be simple (Keep It Simple, Stupid).
22 To monitor individual logs from the command line, run lmon.pl. Start it without
23 arguments to see what options are possible. You may want to edit configuration
24 defaults in it. A rule file is a text file containing Perl regexps to look for
25 in the log file. Use # in the beginning of eventual comments, blank lines are
26 also ignored. Be careful not to insert apparently blank lines with whitespace,
27 if you don't want to monitor whitespace. You can start a line with ! to perform
28 an inverted match.
30 To control the startup/shutdown of lmon in several instances, use control.pl.
31 That script can be linked up as a rc.d/init.d start, but if you want to run log
32 monitoring as a different user, see the lmon.init example startup script. To
33 see possible options/keywords for control.pl, start it without arguments.
34 Reasons for running lmon.pl in several instances can be to monitor different
35 log files (lmon can only one log file), to send alerts to different mail
36 addresses (only one set of mail addresses per lmon), and/or to use different
37 rule files or other options. The configuration file, control.cfg, will be
38 looked for in the same directory as control.pl. The format of it is divided
39 into sections enclosed in , where each section is one instance of lmon. The
40 name general is special, it will set global defaults.
42 Valid options for general and per instance (all optional):
44 sysname= (pretend alert was sent from this system, useful for FreeBSD jails
45 when monitoring outside them)
47 mode=include (set this to alert on rule hits, anything else for misses -
48 default is to alert on rule misses)
50 from= (mail address to send alerts from)
52 to= (mail addresses to send alerts to)
54 mailservers= (smtp servers, alerts will be sent through one of them directly)
56 buffer=<max lines to buffer> (cap rule hits when exceeding this limit)
58 pid=<pid file> (default is <instance name>.pid in LMon's directory)
60 Required instance options:
62 log=<log file> (log file to monitor)
64 Optional instance options:
66 rules=<rule file> (rule file with regexps to look for, default is
67 <instance name>.rules in LMon's directory)
69 name=<log name> (mention log as this log name in alerts)
71 You may want to have a look in the examples directory for sample control.cfg
72 and rule files.
74 For the command line option/keyword listings from the programs,  means
75 something that is optional, () is an explanation, and <> is a required option
76 within that context. Do not include them, substitute with what you want
77 instead. For the command line, if you want to use spaces/whitespace in an
78 option, enclose it in "". In control.cfg, do not enclose options in "", use
79 whitespace as needed but keep it on one line.
81 NB: Without adjusting $LMon::lines, lmon will only discover new log lines.
86 Perl 5 is required. Also, lmon.pl needs Mail::Sendmail and File-Tail, and
87 control.pl needs Config::IniFiles. Download Perl from www.perl.org, and Perl
88 modules from www.cpan.org.
90 Target platforms are initially FreeBSD, Solaris and Linux. Other platforms
91 may be supported upon request and/or feedback. Particularly the control.pl
92 script may need modifications for other operating systems because of its
93 picky usage of ps.
95 You may need to set the path for the Perl programs, if it does not exist as
101 2004-12-29: Initial version released.
103 2005-04-18: Version 1.1
105 - Add possibility to set mail servers from the command line for lmon.pl, and
106 from control.cfg.
107 - Bug fix: improve checks for running processes (use getuid instead of
108 getlogin to determine which users processes to look for, remove leading
109 blankspace from ps output, assume perl.* process name, not just perl).
110 - Add posibility to use ! in the start of a rule, to invert the match(ing).
112 2005-04-18: Version 1.1a
114 Correct silly subject typo.
116 2005-05-19: Version 1.2
118 - Misc. bugfixes for control.pl: fix pidfile filename taint problem and -i
119 option not working with status and stop commands.
120 - Add validation of rules (regexp correctness) to lmon.pl at startup, exit
121 with details about the errors if there are any. Make control.pl print this
122 information also. Without this validation, lmon could start but exit once
123 there is new data in the monitored logfile.
124 - Add detach option for lmon.pl. Default is to run in the foreground.
129 See the file LICENSE.
134 Anders Nordby <email@example.com>
136 URL: http://www.bsdconsulting.no/tools/
138 You are hereby encouraged to send any modifications/improvements, tips or
139 feedback back to the author.