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

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 107
          http://logwatch.svn.sourceforge.net/logwatch/?rev=107&view=rev
Author:   opoplawski
Date:     2012-05-17 15:41:03 +0000 (Thu, 17 May 2012)
Log Message:
-----------
Handle more puppet messages

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

Modified: scripts/services/puppet
===================================================================
--- scripts/services/puppet	2012-05-12 14:24:07 UTC (rev 106)
+++ scripts/services/puppet	2012-05-17 15:41:03 UTC (rev 107)
@@ -74,6 +74,8 @@
       $ChangedFilesContent{$File} .= $Content;
    } elsif ($ThisLine =~ /File\[(.+)\].+created/) {
       $CreatedFiles{$1}++;
+   } elsif ($ThisLine =~ /File\[(.+)\].+defined content/) {
+      $CreatedFiles{$1}++;
    } elsif ($ThisLine =~ /File\[(.+)\].+removed/) {
       $RemovedFiles{$1}++;
    } elsif (($fileinfo) = ($ThisLine =~ /Filebucketed (.*)/)) {
@@ -99,6 +101,10 @@
       $ServiceStarts{$1}++;
    } elsif ($ThisLine =~ /Service\[(.+)\].+Triggering 'refresh' from [0-9]+ dependencies/) {
       $ServiceStarts{$1}++;
+   } elsif ($ThisLine =~ /Service\[(.+)\].+ensure changed \'.+\' to \'stopped\'/) {
+      $ServiceStops{$1}++;
+   } elsif ($ThisLine =~ /User\[(.+)\].+changed password/) {
+      $PasswordChanged{$1}++;
    } elsif ($ThisLine =~ /Dependency .+\[.+\] has [0-9]+ failure/) {
       $DependencyFailures++;
    } else {
@@ -190,6 +196,20 @@
    }
 }
 
+if (keys %ServiceStops) {
+   print "\nService stops:\n";
+   foreach $ThisOne (keys %ServiceStops) {
+      print "    $ThisOne: $ServiceStops{$ThisOne} Time(s)\n";
+   }
+}
+
+if (keys %PasswordChanged) {
+   print "\nPassword changed:\n";
+   foreach $ThisOne (keys %PasswordChanged) {
+      print "    $ThisOne: $PasswordChanged{$ThisOne} Time(s)\n";
+   }
+}
+
 if ($ResourceFailures > 0) {
    print "\nResource failures: $ResourceFailures\n";
 }

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
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.