[Logwatch-Devel] OpenVpn Files

Who Knows quien-sabe at metaorg.com
Thu Jul 29 17:36:07 MST 2004


I have these working fine for my network, but thought I would post them 
in case there are other OpenVPN users who could give feedback.

Otherwise if no feedback, please accept them inclusion.

Regards,
Jim

-- 
Helping Business Profit From Technology
http://www.aidant.net

-------------- next part --------------
###########################################################################
# ------------------------------------------------------------------------
###########################################################################

# You can put comments anywhere you want to.  They are effective for the
# rest of the line.

# this is in the format of <name> = <value>.  Whitespace at the beginning
# and end of the lines is removed.  Whitespace before and after the = sign
# is removed.  Everything is case *insensitive*.

# Yes = True  = On  = 1
# No  = False = Off = 0

Title = "OpenVPN"

# Which logfile group...
LogFile = messages

# Only give lines pertaining to ntpd...
*OnlyService = openvpn

*RemoveHeaders = 

-------------- next part --------------
#!/usr/bin/perl
##########################################################################
# $Id: openvpn,v 1.1 2004/06/21 14:59:05 kirk Exp $
##########################################################################

########################################################
# Logwatch was written and is maintained by:
#    Kirk Bauer <kirk at kaybee.org>
#
# The openvpn script was written by:
#    Jim Richardson <develop at aidant.net>
#
########################################################

my $Debug = $ENV{'LOGWATCH_DEBUG'};
my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'};
   
if ( $Debug >= 5 ) {
    print STDERR "\n\nDEBUG \n\n";
}

while (defined($ThisLine = <STDIN>)) {
   chomp($ThisLine);
   if (
      ($ThisLine =~ /^TLS: soft reset/) or
      ($ThisLine =~ /^TLS: tls_process: killed expiring key$/) or
      ($ThisLine =~ /^Control Channel: TLSv1, cipher/) or
      ($ThisLine =~ /^Data Channel Decrypt: Cipher/) or
      ($ThisLine =~ /^Data Channel Decrypt: Using/) or
      ($ThisLine =~ /^Data Channel Encrypt: Cipher/) or
      ($ThisLine =~ /^Data Channel Encrypt: Using/)
   ) {
      # Don't care about these...
   }  elsif (($status, $org, $cn) = ( $ThisLine =~ /^VERIFY (.*): depth=.*O=(.*)\/OU=.*CN=(.*)\// )) {

		#TLS: tls_process: killed expiring key:
		#VERIFY OK: depth=0, /C=US/ST=TX/O=Aidant.Enterprises/OU=IT/CN=delta.aidant.net/Email=keymaster at aidant.net: 23 Time(s)
      $VerifyList{"status: $status ORG: $org CN: $cn"}++;
		 

   } else {
      # Report any unmatched entries...
      # remove PID from named messages
      #$ThisLine =~ s/^(client [.0-9]+)\S+/$1/;
      $OtherList{$ThisLine}++;
   }
   $LastLine = $ThisLine;
}

################################################


if (keys %VerifyList) {
   print "Verify\n";
   foreach $line (sort {$a cmp $b} keys %VerifyList) {
      print "   $line: $VerifyList{$line} Time(s)\n";
   }
}

if (keys %OtherList) {
   print "\n**Unmatched Entries**\n";
   foreach $line (sort {$a cmp $b} keys %OtherList) {
      print "   $line: $OtherList{$line} Time(s)\n";
   }
}

exit(0);


# vi: shiftwidth=3 tabstop=3 et



More information about the Logwatch-Devel mailing list