named connection refused
"gulikoza" <[email protected]> Tue, 9 Sep 2014 11:05:44 +0200
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
r207 added support for named connection refused logging, however the regex
only matches lines like (Centos5 example):
localhost named[2380]: connection refused resolving
'domain.example.com/A/IN': xxx.xxx.xxx.xxx#53
Centos6 has error message in parentheses:
localhost named[2760]: error (connection refused) resolving
'domain.example.com/A/IN': xxx.xxx.xxx.xxx#53
Adjust regex to match both types of error:
--- a/scripts/services/named
+++ b/scripts/services/named
@@ -303,7 +303,7 @@ while (defined($ThisLine = <STDIN>)) {
$ZoneExpired{$Zone}++;
} elsif ( ($Zone) = ( $ThisLine =~ /zone (.+)\: loaded serial/ ) ) {
$ZoneLoaded{$Zone}++;
- } elsif ( (undef,$Addr,$Server) = ( $ThisLine =~ /(C|c)onnection refused
resolving '(.+)': (.+)/ ) ) {
+ } elsif ( (undef,$Addr,$Server) = ( $ThisLine =~ /(C|c)onnection
refused\)? resolving '(.+)': (.+)/ ) ) {
$ConnectionRefused{$Addr}{$Server}++;
} elsif ( (undef,$Addr,undef,$Server) = ( $ThisLine =~ /ame server
(on|resolving) '(.+)' \(in .+\):\s+(\[.+\]\.\d+)?\s*'?(.+)'?:?/ ) ) {
$LameServer{$Addr}{$Server}++;
Regards,
gulikoza
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk