| Class | Hash |
| In: |
lib/clog.rb
|
| Parent: | Object |
Log files are big boring tangles of spaghetti that are about as much fun to review in their raw format as it is to go to the dentist. Yet, not reviewing your logs is one sure-fire way to be negligent, especially when you’re a System Administrator. What is needed is a log distiller - something that will make sense out of your logs and give a succinct report on them.
Enter clog. Clog distills logs with the help of agents which are chunks of ruby code. A chain of agents is called for each line of the log file. At the end, the agents are asked to report on their findings. Agents are simple to write and as a result clog is easy to customize and extend.
Clog is designed to be up and running in no time flat. The configuration file specifies which logs to distill, and the chain of agents to use for each pattern of log files. See the example annotated configuration file.
If you write an agent for the logs generated by a common piece of software, send it along (preferably as a darcs patch bundle) and I will probably include it. While you are free to do literally anything with your homegrown agents, the philosophy of the distributed agents is to say as little as possible in the report, to not leave out anything important, and to not consume anything that is not understood so that anomalous readings can be reported by the Fallback agent.
make config show make install
"make install" does not set up a cron job. See examples/crontab for a sample crontab.
If you don’t like the output of "make show", run "ruby setup.rb config" with the parameters you want.
Copyright (C) 2005 Hans Fugal <hans@fugal.net>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA