Re: Logwatch replacement..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Mortimer <ian@xxxxxxxxxxxxxxxxx> 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.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux