SF.net SVN: logwatch:[110] scripts/services/syslog-ng

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 110
          http://logwatch.svn.sourceforge.net/logwatch/?rev=110&view=rev
Author:   stefjakobs
Date:     2012-06-18 19:33:59 +0000 (Mon, 18 Jun 2012)
Log Message:
-----------
syslog-ng: report internal errors

Modified Paths:
--------------
    scripts/services/syslog-ng

Modified: scripts/services/syslog-ng
===================================================================
--- scripts/services/syslog-ng	2012-05-27 21:12:18 UTC (rev 109)
+++ scripts/services/syslog-ng	2012-06-18 19:33:59 UTC (rev 110)
@@ -51,7 +51,7 @@
 my (%Stats_center, %Stats_source, %Stats_dest)	= ( (), (), ());
 my (%Stats_dropped, %Stats_supp, %Stats_global)	= ( (), (), ());
 my (%Stats_dropped_net, %Stats_supp_net)	= ( (), ());
-my (%Warnings) = ();
+my (%Warnings, %IntErrors) = ( (), ());
 
 ### Parse the lines ###
 
@@ -200,12 +200,18 @@
    elsif ($ThisLine =~ /^WARNING: (.*)$/) {
       $Warnings{$1}++;
    }
-   # syslog-nb v3.X
+   # syslog-ng v3.X
    #TD syslog-ng[1601]: Configuration file has no version number, assuming ...
    elsif ($ThisLine =~ /(Configuration file has no version number)/) {
       $Warnings{$1}++;
    }
 
+   #TD syslog-ng[2550]: Internal error, duplicate configuration elements refer to
+   #   the same persistent config; name='afsocket_sd_connections(dgram,AF_INET(0.0.0.0:514))'
+   elsif ($ThisLine =~ /Internal error, ([^;]*); name='([^']*)'/) {
+      $IntErrors{$1}{$2}++;
+   }
+
    else {
       # Report any unmatched entries...
       chomp($ThisLine);
@@ -365,6 +371,16 @@
     print "\nSyslog-ng dropped " . $Drops ." line(s)\n";
 }
 
+if (keys %IntErrors) {
+   print "\nInternal Errors:\n";
+   foreach my $class (sort {$a cmp $b} keys %IntErrors) {
+      print "    $class\n";
+      foreach my $error (sort {$a cmp $b} keys %{$IntErrors{$class}}) {
+         print "\t$error : $IntErrors{$class}{$error} Time(s)\n";
+      }
+   }
+}
+
 if (keys %Warnings) {
    print "\nWarnings:\n";
    foreach my $warning (keys %Warnings) {

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.