Bug 18414 - rsyncd ignores "log format"
Summary: rsyncd ignores "log format"
Status: CLOSED NOTABUG
Alias: None
Product: Sisyphus
Classification: Development
Component: rsync-server (show other bugs)
Version: unstable
Hardware: all Linux
: P2 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-31 20:35 MSK by Michael Shigorin
Modified: 2009-01-01 20:33 MSK (History)
4 users (show)

See Also:


Attachments
rsync2webalizer script (2.32 KB, text/plain)
2008-12-31 20:38 MSK, Michael Shigorin
no flags Details
rsync2webalizer script (2.96 KB, application/octet-stream)
2009-01-01 20:33 MSK, Michael Shigorin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2008-12-31 20:35:43 MSK
# grep "^log format" /etc/rsyncd.conf
log format = %a - -  [%t] "GET /%m/%f" - %l "" ""

Dec 31 19:13:02 pad rsyncd[15698]: connect from localhost.localdomain (127.0.0.1)
Dec 31 19:13:02 pad rsyncd[15698]: rsync on pub/Linux/pmagic-3.1.iso.zip from localhost.localdomain (127.0.0.1)
Dec 31 19:13:02 pad rsyncd[15698]: building file list
Dec 31 19:13:03 pad rsyncd[15698]: sent 28298 bytes  received 49353 bytes  total size 49531904
Dec 31 19:23:52 pad rpm: rsync-2.6.3-alt3 installed
Dec 31 19:23:53 pad rpm: rsync-3.0.4-alt3 removed
Dec 31 19:23:53 pad rpm: rsync-server-2.6.3-alt3 installed
Dec 31 19:23:53 pad rpm: rsync-server-3.0.4-alt3 removed
Dec 31 19:24:13 pad rsyncd[16164]: rsync on pub/Linux/pmagic-3.1.iso.zip from localhost.localdomain (127.0.0.1)
Dec 31 19:24:14 pad rsyncd[16164]: 127.0.0.1 - -  [2008/12/31 17:24:14] "GET /pub/Linux/pmagic-3.1.iso.zip" - 49531904 "" ""
Dec 31 19:24:14 pad rsyncd[16164]: wrote 28289 bytes  read 49406 bytes  total size 49531904

Thus this "log format" configuration worked for updates/Master/2.4 package but broke for Sisyphus one (it was noted that 2.6.9 would be broken already).  Now it seems to be simply ignored.
Comment 1 Michael Shigorin 2008-12-31 20:38:56 MSK
Created attachment 3176 [details]
rsync2webalizer script

PS: the whole affair was set up to make rsync generate CLF (common log format) logs to be fed into webalizer after being processed with the attached script by Jim Hefferon who wrote it for CTAN.
Comment 2 Dmitry V. Levin 2009-01-01 05:18:56 MSK
You forgot to enable "transfer logging".

Starting with 2.6.4-alt1 (release date Mar 31 2005, see %changelog), this option is no longer enabled by default.
Comment 3 Michael Shigorin 2009-01-01 20:07:00 MSK
Hm, I've definitely read up on that option and *seem* to have tried that... anyways, this works for me now with 3.0.4-alt3:

log format = %a - -  [%t] "GET /%m/%f" - %l "" ""
transfer logging = yes
syslog facility = ftp

(just in case, "log file" adds stupid prefix to format string without being asked to)

Sorry for bothering :)
Comment 4 Michael Shigorin 2009-01-01 20:33:47 MSK
Created attachment 3180 [details]
rsync2webalizer script

OK, so here's an updated version of the script which would take current changes in logging into account (and works for me) -- just in case anyone needs to feed rsync stats into webalizer using a convertor to common log format.

Should package it, probably...