[Logwatch] LogWatch on HP-UX (Mike Tremaine)

Kit Gerrits kitgerrits at gmail.com
Tue Jan 16 14:09:28 MST 2007


Hey mike,

I have actually become rather adept at building/debuging rules when I make
some extra rules for the old 2.5
Handling inetd-hammering handling to the script taught me a few things about
regexes and arrays.
(And the sheer size of array Perl can handle)

Is there (now) a standardised set of constructs for grabbing terms in
regexes?

What is the 'current' method of capturing an IP address? 
  (:num:*\.:num:*\.:num:*\.:num:* seems rather silly)
And capturing words? 
  (I found [^ ] to be rather elegant)
What about a string with whitespaces?
  (sudo log-lines come to mind...)

Is there anything I can do about those chomped \n's when displaying them at
the end of the log?
(aside from re-adding them when storing them inside the array)


Some of these tricks may already have been shown in the 'modifying LogWatch'
document, 
  but that last bit has been bothering me for ages.


As a side note, my senior was actually plesasantly surprised to find I
managed to get it to work on HP-UX.
Manually inspecting syslog is a pain and my 'grep regex' for syslog was
getting long...


Thanks again for all your time and support,
It's the respectful handling of n00b questions 
  that shows the real difference between BSD and Linux community


Kit Gerrits



More information about the Logwatch mailing list