SF.net SVN: logwatch:[188] scripts/services/puppet

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 188
          http://sourceforge.net/p/logwatch/code/188
Author:   stefjakobs
Date:     2014-02-07 13:55:43 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
puppet: report account expiry time; ignore info msgs from 2.7.x puppet

Modified Paths:
--------------
    scripts/services/puppet

Modified: scripts/services/puppet
===================================================================
--- scripts/services/puppet	2014-02-07 13:54:32 UTC (rev 187)
+++ scripts/services/puppet	2014-02-07 13:55:43 UTC (rev 188)
@@ -54,7 +54,8 @@
       ($ThisLine =~ /FileBucket adding/) or
       ($ThisLine =~ /^Caching certificate/) or
       ($ThisLine =~ /^Certificate Request fingerprint/) or
-      ($ThisLine =~ /^Creating state file/)
+      ($ThisLine =~ /^Creating state file/) or
+      ($ThisLine =~ /Provider useradd does not support features manages/)
    ) {
       # Ignore
    } elsif (($junk, $failure, $reason) = ($ThisLine =~ /^(\(.*\) |)Could not ([^:]*): (.*)/)) {
@@ -104,6 +105,8 @@
       $ServiceStops{$1}++;
    } elsif ($ThisLine =~ /User\[(.+)\].+changed password/) {
       $PasswordChanged{$1}++;
+   } elsif ($ThisLine =~ /User\[(.+)\].+defined \'expiry\' as \'([0-9-]{10})\'/) {
+      $ExpiryChanged{$1}{$2}++;
 
    # Generic rules need to be last
    } elsif (($type, $name, $attr) = $ThisLine =~ /([^\/]+)\[([^\]]+)\]\/([^\/]+)\) (created|defined content)/) {
@@ -229,6 +232,16 @@
    }
 }
 
+if (keys %ExpiryChanged) {
+   print "\nExpiry changed:\n";
+   foreach $ThisOne (keys %ExpiryChanged) {
+      print "    $ThisOne:\n";
+      foreach $date (keys %{${ExpiryChanged}{$ThisOne}}) {
+         print "        $date: $ExpiryChanged{$ThisOne}{$date} Time(s)\n";
+      }
+   }
+}
+
 foreach $Type (sort(keys %Created)) {
    print "\n$Type created:\n";
    foreach $Name (sort(keys %{$Created{$Type}})) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
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.