Skip to content

chobie/mod_log_fluentd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the logger for Apache2.

this modules highly inspired emaland/mod_log_scribe.

EXPERIMENTAL

DO NOT USE ANY PRODUCTION OR STAGING ENVIRONMENT. THIS MODULE MUST BE CRUSH.

Dependencies

msgpack (c) libuv

Install

sudo apxs2 -a -i -I/home/vagrant/libuv/include -lpthread -lrt -lm -lmsgpack -Wc,-g3 -c mod_log_fluentd.c ../libuv/uv.a -D_FILE_OFFSET_BITS=64

also you need to install msgpack for C and libuv. please specify -fPIC flag when you building libuv.

Todo

So many!

Outputs

this module provides direct logging to fluentd.

2012-02-15 03:16:05 +0000 debug.test: ["127.0.0.1"," ","-"," ","-"," ","[18/Feb/2012:02:27:42 +0000]"," \"","GET / HTTP/1.1","\" ","200"," ","44"," \"","-","\" \"","curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18","\"","\n"]

Configurations

CustomLog fluentd:<default_tag>@<host>[:port] "format"

for example:

CustomLog fluentd:debug.test@127.0.01:24224 "%u"

host expects ip address.

variable names (draft)

it's very useful to identify log value. currently, it does not support ;( this feature requires fully implement own logger for apache2. mod_log_fluentd uses mod_log_config's writer dispatch mechanism.

remote_addr: %a
server_addr: %A
response_size: %B
cookies.FooBar: %{FooBar}C
processing_time: %d
file_name: %f
remote_host: %h
request_protocol: %H
headers.FooBar: %{FooBar}e
ident_name: %l
request_method: %m
memo.FooBar: %{FooBar}n
response.FooBar: %{FooBar}o
server_port: %p
process_id: %P
worker_id: %{format}P
query_string: %q
first_line: %r
status: %s
request_time: %t
formated_time: %{format}t
processing_time: %T
remote_user: %u
path: %U
server_name: %v
canonical_name: %V
response_status: %X
recived_size: %I (mod_logio)
send_size: %O (mod_logio)

About

experimental logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages