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

[email protected]
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Revision: 190
          http://sourceforge.net/p/logwatch/code/190
Author:   stefjakobs
Date:     2014-02-07 13:57:18 +0000 (Fri, 07 Feb 2014)
Log Message:
-----------
syslog-ng: report broken connections

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

Modified: scripts/services/syslog-ng
===================================================================
--- scripts/services/syslog-ng	2014-02-07 13:56:36 UTC (rev 189)
+++ scripts/services/syslog-ng	2014-02-07 13:57:18 UTC (rev 190)
@@ -116,8 +116,12 @@
 
    #TD syslog-ng[4833]: Syslog connection closed; fd='45', client='AF_INET(192.168.1.1:40280)', local='AF_INET(192.168.1.10:625)'
    #TD syslog-ng[4833]: Syslog connection accepted; fd='52', client='AF_INET(192.168.1.1:40280)', local='AF_INET(192.168.1.10:625)'
-   elsif ($ThisLine =~ /^Syslog connection (\S+); fd='\d+', client='AF_INET\(([.\d]+):\d+\)', local='AF_INET\(([.\d]+:\d+)\)'$/) {
-      $Connections{$1}{$3}{$2}++;
+   # syslog-ng v3.X
+   #TD Syslog connection broken; fd='63', server='AF_INET(192.169.1.1:514)', time_reopen='60' : 44 Time(s)
+   #TD Syslog connection established; fd='48', server='AF_INET(192.168.1.1:514)', local='AF_INET(0.0.0.0:0)' 
+   elsif ($ThisLine =~ /^Syslog connection (\S+); fd='\d+', (server|client)='AF_INET\(([.\d]+):\d+\)', (?:local='AF_INET\(([.\d]+:\d+)\)'|time_reopen='\d+')?$/) {
+      my $loc = defined($4) ? $4 : '0.0.0.0';
+      $Connections{"$1 ($2)"}{$loc}{$3}++;
    }
 
    #TD syslog-ng[4833]: Connection broken to AF_INET(XXX.YYY.ZZZ.AAA:BBB), reopening in 60 seconds

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.