Revision: 196
http://sourceforge.net/p/logwatch/code/196
Author: opoplawski
Date: 2014-05-30 17:17:15 +0000 (Fri, 30 May 2014)
Log Message:
-----------
[audit] Ignore initializing netlink subsys
Modified Paths:
--------------
scripts/services/audit
scripts/services/dovecot
scripts/services/zz-disk_space
Modified: scripts/services/audit
===================================================================
--- scripts/services/audit 2014-05-22 17:47:51 UTC (rev 195)
+++ scripts/services/audit 2014-05-30 17:17:15 UTC (rev 196)
@@ -103,7 +103,7 @@
chomp($ThisLine);
# Remove timestamp if present
$ThisLine =~ s/^\[\s*\d+\.\d+\]\s*//;
- if (( $ThisLine =~ /initializing netlink socket \(disabled\)/) or
+ if (( $ThisLine =~ /initializing netlink (socket|subsys) \(disabled\)/) or
( $ThisLine =~ /audit_pid=[0-9]* old=[0-9]*(?: by auid=[0-9]*)?/) or
( $ThisLine =~ /(arch=[0-9]+ )?syscall=[0-9]+ (success=(no|yes) )?exit=[0-9-]+( a[0-3]=[0-9a-f]+)* items=[0-9]+ (ppid=[0-9]+ )?pid=[0-9]+ (loginuid=[0-9-]+ )?(auid=[0-9]+ )?uid=[0-9]+ gid=[0-9]+ euid=[0-9]+ suid=[0-9]+ fsuid=[0-9]+ egid=[0-9]+ sgid=[0-9]+ fsgid=[0-9]+/) or
( $ThisLine =~ /Audit daemon rotating log files/) or
Modified: scripts/services/dovecot
===================================================================
--- scripts/services/dovecot 2014-05-22 17:47:51 UTC (rev 195)
+++ scripts/services/dovecot 2014-05-30 17:17:15 UTC (rev 196)
@@ -181,43 +181,43 @@
}
# 'lda' for dovecot 2.0, 'deliver' for earlier versions
- } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): msgid=.*: saved mail to (\S+)/ ) ) {
+ } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\):(?: Info:)? msgid=.*: saved mail to (\S+)/ ) ) {
$Deliver{$User}{$Mailbox}++;
# For Sieve-based delivery
- } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag (?:lda\(|deliver\(|lmtp\(\d+, )(.*)\): (?:[^:]+: )?sieve: msgid=.*: stored mail into mailbox '([^']*)'/ ) ) {
+ } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?(?:lda\(|deliver\(|lmtp\(\d+, )(.*)\): (?:[^:]+: )?sieve: msgid=.*: stored mail into mailbox '([^']*)'/ ) ) {
$Deliver{$User}{$Mailbox}++;
# LMTP-based delivery
- } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^$dovecottag lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (\S+)/ ) ) {
+ } elsif ( ($User, $Mailbox) = ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(\d+, (.*)\): [^:]+: msgid=.*: saved mail to (\S+)/ ) ) {
# dovecot: [ID 583609 mail.info] lmtp(12782, [email protected]): jBt1EfjCMk3uMQAAm9eMBA: msgid=<[email protected]>: saved mail to INBOX
$Deliver{$User}{$Mailbox}++;
# sieve forward
- } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* forwarded to \<(.*)\>/)) {
+ } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* forwarded to \<(.*)\>/)) {
$Forwarded{$User}{$Recip}++;
# sieve vacation
- } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* sent vacation response to \<(.*)\>/)) {
+ } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* sent vacation response to \<(.*)\>/)) {
$VacationResponse{$User}{$Recip}++;
- } elsif (($User, $Recip) = ($ThisLine =~ /^$dovecottag (?:lda|deliver)\((.*)\): sieve: msgid=.* discarded duplicate vacation response to \<(.*)\>/ )) {
+ } elsif (($User, $Recip) = ($ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\((.*)\): sieve: msgid=.* discarded duplicate vacation response to \<(.*)\>/ )) {
$VacationDup{$User}{$Recip}++;
- } elsif ( $ThisLine =~ /^$dovecottag (?:lda|deliver)\(.*\): sieve: msgid=.* marked message to be discarded if not explicitly delivered/ ) {
+ } elsif ( $ThisLine =~ /^(?:$dovecottag )?(?:lda|deliver)\(.*\): sieve: msgid=.* marked message to be discarded if not explicitly delivered/ ) {
# dovecot: lda(joe): sieve: msgid=<m$01$@com>: marked message to be discarded if not explicitly delivered (discard action)
# IGNORE
- } elsif ( $ThisLine =~ /^$dovecottag lmtp\(.*\): Connect from/ ) {
+ } elsif ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(.*\): Connect from/ ) {
# dovecot: [ID 583609 mail.info] lmtp(12782): Connect from local: 1 Time(s)
# IGNORE
- } elsif ( $ThisLine =~ /^$dovecottag lmtp\(.*\): Disconnect from/ ) {
+ } elsif ( $ThisLine =~ /^(?:$dovecottag )?lmtp\(.*\): Disconnect from/ ) {
# dovecot: [ID 583609 mail.info] lmtp(12782): Disconnect from local: Client quit: 1 Time(s)
# IGNORE
# This is for Dovecot 1.0 series
- } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) {
+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?pop3-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/ ) ) {
if ($Host !~ /$IgnoreHost/) {
$Host = hostName($Host);
$Login{$User}{$Host}++;
@@ -225,7 +225,7 @@
$ConnectionPOP3{$Host}++;
$Connection{$Host}++;
}
- } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) {
+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: Login: user=\<(.*?)\>.*rip=(.*)\, lip=/) ) {
if ($Host !~ /$IgnoreHost/) {
$Host = hostName($Host);
$Login{$User}{$Host}++;
@@ -235,14 +235,14 @@
}
# Dovecot 2.0 proxy
- } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag pop3-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?pop3-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
if ($Host !~ /$IgnoreHost/) {
$ProxyLogin{$User}{$Host}++;
$ProxyLoginPOP3{$User}++;
$ProxyConnectionPOP3{$Host}++;
$ProxyConnection{$Host}++;
}
- } elsif ( ($User, $Host) = ( $ThisLine =~ /^$dovecottag imap-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
+ } elsif ( ($User, $Host) = ( $ThisLine =~ /^(?:$dovecottag )?imap-login: proxy\((.*)\): started proxying to .*: user=<.*>, method=.*, rip=(.*), lip=/ ) ) {
if ($Host !~ /$IgnoreHost/) {
$ProxyLogin{$User}{$Host}++;
$ProxyLoginIMAP{$User}++;
@@ -306,7 +306,7 @@
# dovecot: child 23747 (login) returned error 89
# dovecot: log: Error: service(auth): child 19654 returned error 89 (Fatal failure)
$ChildErr{$Error}++;
- } elsif (($Name) = ($ThisLine =~ /$dovecottag IMAP\((.*)\): .*(.*) failed: Disk quota exceeded/i)) {
+ } elsif (($Name) = ($ThisLine =~ /(?:$dovecottag )?IMAP\((.*)\): .*(.*) failed: Disk quota exceeded/i)) {
# dovecot: IMAP(podracka): mkdir(/home/LF/KLINIKY/podracka/mail/.imap/saved-messages) failed: Disk quota exceeded
$DiskQuotaExceed{$Name}++;
} else {
Modified: scripts/services/zz-disk_space
===================================================================
--- scripts/services/zz-disk_space 2014-05-22 17:47:51 UTC (rev 195)
+++ scripts/services/zz-disk_space 2014-05-30 17:17:15 UTC (rev 196)
@@ -171,6 +171,23 @@
print "\n";
}
+sub LVSpace ()
+{
+ if ( $ENV{'lvs_options'} ) {
+ $lvs_options = $ENV{'lvs_options'};
+ };
+
+ $lvs_cmd = "lvs $lvs_options";
+
+ if ( $ENV{'lvs_cmd'} ) {
+ $lvs_cmd = $ENV{'lvs_cmd'};
+ };
+
+ system($lvs_cmd);
+
+ print "\n";
+}
+
sub DiskFull {
my $o = `$disk_cmd`;
my @rows = split('\n', $o);
@@ -189,7 +206,10 @@
#Main
#Only show disk space "df" by default -mgt
-DiskSpace() if (($ENV{PRINTING} eq 'y') or $Detail);
+if (($ENV{PRINTING} eq 'y') or $Detail) {
+ DiskSpace();
+ LVSpace();
+}
if ( $show_disk_usage == 1 ) { DiskUsage(); }; #Turn on in zz-disk_space.conf
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.