Last active
August 29, 2015 14:18
-
-
Save maimai-swap/d6cb61e4c853bfeecb2d to your computer and use it in GitHub Desktop.
td-agent Apache ltsv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<source> | |
type config_expander | |
<config> | |
type tail | |
format ltsv | |
time_format %d/%b/%Y:%H:%M:%S %z | |
path XXXXXXXXXXXXXXXXXXX | |
tag apache.access | |
pos_file /var/log/td-agent/apache.access.pos | |
</config> | |
</source> | |
<match apache.access> | |
type copy | |
<store> | |
type grep | |
exclude1 ua ELB-HealthChecker | |
add_tag_prefix front | |
</store> | |
</match> | |
<match *.apache.access> | |
type forest | |
subtype copy | |
<template> | |
<store> | |
type s3 | |
aws_key_id XXXXXXXXXXXXX | |
aws_sec_key XXXXXXXXXXXXX | |
s3_bucket XXXXXXXXXXXXX | |
s3_region XXXXXXXXXXXXX | |
path logs/${tag_parts[0]} | |
s3_object_key_format %{path}/%{time_slice}-%{hostname}_%{index}.%{file_extension} | |
buffer_path /var/log/td-agent/buffer/s3-${tag_parts[0]} | |
format json | |
store_as text | |
time_slice_format %Y/%m/%d/%H/%Y%m%d-%H%M | |
time_slice_wait XXXXXXXm | |
include_time_key true | |
</store> | |
</template> | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment