Logwatch replacement..
Harry Putnam
reader at newsguy.com
Tue Jan 11 00:58:37 UTC 2005
Ian Mortimer <ian at physics.uq.edu.au> writes:
> You could do what I did and write your own script to pull out the
> information you want from whatever logs you're interested in.
> To get started try this:
>
> grep -vEf $excl /var/log/messages
>
> (where $excl is a file of exclude patterns).
>
> or without the v, grep with a file of include patterns.
>
> Then you can just add patterns to the exclude/include file until
> you're getting all and only the information you want.
>
Yes, I've done that too, then you are stuck with keeping up with your
scripts during upgrades etc, instead of having a rpm to install.
By the way you might find the push pull method a little more usefull.
I use a simple perl script the heart of which is a line like this:
(NOTE THIS IS NOT MEANT TO BE A WORKING SCRIPT)
while(<>){
if(/someregex/ && !/someotherregex/){
print "$_\n";
}
}
It just says if line contains someregex and does NOT contain
someotherregex, then print it. It can be a very exacting way to pull
out what you want.
More information about the fedora-list
mailing list