4 messages in ru.sysoev.nginxRe: Supporting access_log to a pipe?
FromSent OnAttachments
wesleywuJun 17, 2009 8:53 am 
Igor SysoevJun 17, 2009 10:27 am 
wesleywuJun 17, 2009 12:39 pm 
Cliff WellsJun 17, 2009 1:09 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Supporting access_log to a pipe?Actions...
From:Cliff Wells (cli@develix.com)
Date:Jun 17, 2009 1:09:19 pm
List:ru.sysoev.nginx

On Wed, 2009-06-17 at 11:53 -0400, wesleywu wrote:

I need to monitor access log in a separated application, to identify frequent
visits like DoS attack.

Now I'm using apache httpd. CustomLog directive of httpd (equivalent to
access_log directive in Ngnix) supports write log lines to the stdin of a piped
application.

Quote from http://httpd.apache.org/docs/2.2/mod/mod_log_config.html

Syntax: CustomLog file|pipe format|nickname environment-variable] pipe The pipe character "|", followed by the path to a program to receive the log
information on its standard input.

Will Ngnix support this feature? Or is there any solution to monitor every log
line of access_log?

You might consider using a different syslogd such as metalog which supports event handling and see if you can get this patch to work (apparently it's widely used, so I have some faith in its stability):

For 0.6.x: http://www.ruby-forum.com/topic/153141

For 0.7.x: http://www.ruby-forum.com/topic/178502

Regards, Cliff