How can I get logwatch to ignore unmatched entries?
How can I get logwatch to ignore unmatched entries?
Example: Code:
--------------------- Connections (secure-log) Begin ------------------------ I tried negating that service in the config file and got the error: Code:
# /usr/share/logwatch/scripts/logwatch.pl TIA |
Only by looking at threads like this you will realise that by making Logwatch actually display logged errors you can take action. In short: keeping errors from being displayed defeats the purpose of logging and using Logwatch.
What you should do is create a service configuration. Using the "up2date" service (since it's a small config) as example, you see it comprises of: - a service declaration in /usr/share/logwatch/default.conf/logfiles/up2date.conf, - a logfile declaration in /usr/share/logwatch/default.conf/services/up2date.conf, - log preprocessing scripts log in /usr/share/logwatch/scripts/logfiles/ and - the actual service processing script /usr/share/logwatch/scripts/services/up2date. In the scripts/services/up2date script, at around like 27 it starts the "ignore" section in which you can add all lines that are of the informational level or purpose: Code:
22 while (defined($ThisLine = <STDIN>)) { Your other option is adding regexes to /etc/logwatch/conf/ignore.conf, one item per line (gets matched through "$logline =~ m/$ignore/;"), like: Code:
Cp-Wrap Code:
Pushing "733 |
All times are GMT -5. The time now is 08:36 PM. |