From 7ff4d070e2fa8cb9ea507f92b2b3d4194ec81c17 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 20 Dec 2011 14:19:37 +0100 Subject: Do not import TCP_DENIED lines Those pages were never showed to the client so there is no point in store those for analyzing. Some applications (like Nokia connection suite) will ignore an auth reject and will retry several times per second which will flood the logs. --- weblog-model.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'weblog-model.lua') diff --git a/weblog-model.lua b/weblog-model.lua index 9aa31f8..7f09c7d 100644 --- a/weblog-model.lua +++ b/weblog-model.lua @@ -566,6 +566,12 @@ local function parsesquidlog(line) checkwords(logentry) + -- Don't care about TCP_DENIED so apps like dropbox, nokia connection + -- suite does not flood our logs. + if logentry.code == nil or logentry.code == "TCP_DENIED" then + return nil + end + -- Don't care about local requests (from DG) (this check also removes blank lines) if logentry.clientip and logentry.clientip ~= "127.0.0.1" then logentry.logdatetime = os.date("%Y-%m-%d %H:%M:%S", logentry.logdatetime)..string.match(logentry.logdatetime, "%..*") -- cgit v1.2.3