Log_importer and Pure-ftpd CLF log file import problem

Reply to myself…

After many months since my original post, I finally had the opportunity to look into this.

Logs produced by pure-ftpd in CLF (Common Logfile Format), lack the protocol version (as in “GET /somepath HTTP/1.0”).

I have tampered my logs to add the fake protocol “FTP/1.0”. A simple (and fast) sed line makes the workaround:

sed -i -e "s,\" 200, FTP/1.0\" 200,g" /var/log/pureftpd.log.1

I know this might not be the most elegant, and either pure-ftpd should add this to the log lines, or log-importer consider valid a log where the protocol version is missing. But in any case, this solves my problem.

1 Like