SF.net SVN: logwatch:[193]

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 193
          http://sourceforge.net/p/logwatch/code/193
Author:   opoplawski
Date:     2014-05-14 15:05:35 +0000 (Wed, 14 May 2014)
Log Message:
-----------
Add initial support for Dell OMSA logging

Added Paths:
-----------
    conf/services/omsa.conf
    scripts/services/omsa

Added: conf/services/omsa.conf
===================================================================
--- conf/services/omsa.conf	                        (rev 0)
+++ conf/services/omsa.conf	2014-05-14 15:05:35 UTC (rev 193)
@@ -0,0 +1,20 @@
+# 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 = "Dell OMSA"
+
+# Which logfile group...
+LogFile = messages
+
+# Only give lines pertaining to the OMSA service...
+*OnlyService = Server_Administrator
+*RemoveHeaders
+
+# vi: shiftwidth=3 tabstop=3 et

Added: scripts/services/omsa
===================================================================
--- scripts/services/omsa	                        (rev 0)
+++ scripts/services/omsa	2014-05-14 15:05:35 UTC (rev 193)
@@ -0,0 +1,74 @@
+########################################################
+## Copyright (c) 2014 Orion Poplawski
+## Covered under the included MIT/X-Consortium License:
+##    http://www.opensource.org/licenses/mit-license.php
+## All modifications and contributions by other persons to
+## this script are assumed to have been donated to the
+## Logwatch project and thus assume the above copyright
+## and licensing terms.  If you want to make contributions
+## under your own copyright or a different license this
+## must be explicitly stated in the contribution an the
+## Logwatch project reserves the right to not accept such
+## contributions.  If you have made significant
+## contributions to this script and want to claim
+## copyright please contact [email protected]
+#########################################################
+
+use strict;
+my $Detail = $ENV{'LOGWATCH_DETAIL_LEVEL'} || 0;
+my %ServiceError;
+my %ServiceMessage;
+my %OtherList;
+
+# Lines are of the form:
+#     3017 2048 - Storage Service  Device failed:  Battery 0 Controller 0
+#     \d+ \d+ - (\w+) Service  (.*)
+while (defined(my $ThisLine = <STDIN>)) {
+   chomp($ThisLine);
+   my ($Service,$Message) = ($ThisLine =~ /^\d+ \d+ - (\w+) Service  (.*)$/);
+   if ($Message =~ /fail|disable|replace/i) {
+      $ServiceError{$Service}->{$Message}++;
+   } elsif (defined($Service)) {
+      $ServiceMessage{$Service}->{$Message}++;
+   } else {
+      $OtherList{$ThisLine}++;
+   }
+}
+
+if (keys %ServiceError) {
+   print "ERRORS:\n";
+   foreach my $Service (sort {$a cmp $b} keys %ServiceError) {
+      print "    $Service Service:\n";
+      foreach my $Error (sort {$a cmp $b} keys %{$ServiceError{$Service}}) {
+         print "        $Error $ServiceError{$Service}->{$Error} Time(s)\n";
+      }
+      print "\n";
+   }
+}
+
+if (keys %ServiceMessage) {
+   print "Informational:\n";
+   foreach my $Service (sort {$a cmp $b} keys %ServiceMessage) {
+      print "    $Service Service:\n";
+      foreach my $Message (sort {$a cmp $b} keys %{$ServiceMessage{$Service}}) {
+         print "        $Message $ServiceMessage{$Service}->{$Message} Time(s)\n";
+      }
+      print "\n";
+   }
+}
+
+if (keys %OtherList) {
+   print "\n\n**Unmatched Entries**\n";
+   foreach my $line (sort {$a cmp $b} keys %OtherList) {
+      print "   $line: $OtherList{$line} Time(s)\n";
+   }
+}
+
+exit(0);
+
+# vi: shiftwidth=3 tabstop=3 syntax=perl et
+# Local Variables:
+# mode: perl
+# perl-indent-level: 3
+# indent-tabs-mode: nil
+# End:


Property changes on: scripts/services/omsa
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
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.