diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-12-20 14:19:37 +0100 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2012-01-17 08:30:53 -0500 |
commit | 7ff4d070e2fa8cb9ea507f92b2b3d4194ec81c17 (patch) | |
tree | 4eef3042a39c59b17d341af258c3c37ab277b6ae | |
parent | ed757db9c4f5957e800271f7936e065be6cb45fd (diff) | |
download | acf-weblog-7ff4d070e2fa8cb9ea507f92b2b3d4194ec81c17.tar.bz2 acf-weblog-7ff4d070e2fa8cb9ea507f92b2b3d4194ec81c17.tar.xz |
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.
-rw-r--r-- | weblog-model.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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, "%..*") |