You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Jack Bates <du...@nottheoilrig.com> on 2012/05/13 16:29:50 UTC
Send access log entries to script?
What's the easiest way for a script to be notified of Traffic Server
"events" (access log entries)?
I'm interested in maintaining some real time statistics about client
machines, so instead of analyzing log files in batches, I want to
maintain, e.g. running totals of traffic for each client machine (we run
Traffic Server as a forward proxy, so there are a manageable number of
client machines)
I know I can write a plugin and register hooks for event notification. I
was also thinking of configuring Traffic Server to log to a socket or
pipe. Finally I was thinking of using log collation: Configure
proxy.config.log.collation_mode to send access log entries to my
listening script. Are there any libraries for scripting languages to
handle Traffic Server log collation protocol?
What is the easiest approach? Essentially I want some custom Python code
to run whenever an access log entry is logged
Re: Send access log entries to script?
Posted by Gary Law <ga...@garylaw.net>.
On 13 May 2012 15:29, Jack Bates <du...@nottheoilrig.com> wrote:
> What is the easiest approach? Essentially I want some custom Python code to
> run whenever an access log entry is logged
Create a FIFO for your access logs, and then you can pipe to whatever
you fancy, python or otherwise.
HTH
Gary