Created
May 21, 2012 08:27
-
-
Save akimichi/2761160 to your computer and use it in GitHub Desktop.
This file contains 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
<match mongo.**> | |
type mongo | |
database fluent | |
collection log | |
# Following attibutes are optional | |
# host fluenter | |
# port 10000 | |
# Set 'capped' if you want to use capped collection | |
# capped | |
# capped_size 100m | |
# Set 'user' and 'password' for authentication | |
# user handa | |
# password shinobu | |
# Other buffer configurations here | |
</match> | |
## built-in TCP input | |
## $ echo <json> | fluent-cat <tag> | |
<source> | |
type forward | |
<server> | |
host localhost | |
port 24224 | |
</server> | |
</source> | |
## built-in UNIX socket input | |
#<source> | |
# type unix | |
#</source> | |
# HTTP input | |
# http://localhost:8888/<tag>?json=<json> | |
# <source> | |
# type http | |
# port 8888 | |
# </source> | |
## File input | |
## read apache logs with tag=apache.access | |
<source> | |
type tail | |
format apache | |
path /var/log/apache2/access.log | |
tag apache.access | |
</source> | |
## match tag=apache.access and write to file | |
<match apache.access> | |
type mongo | |
database fluent | |
collection apache_access | |
</match> | |
<source> | |
type tail | |
format apache | |
path /var/log/apache2/error.log | |
tag apache.error | |
</source> | |
## match tag=apache.access and write to file | |
<match apache.error> | |
type mongo | |
database fluent | |
collection apache_error | |
</match> | |
## match tag=debug.** and dump to console | |
<match debug.**> | |
type stdout | |
</match> | |
## match tag=system.** and forward to another fluent server | |
#<match system.**> | |
# type forward | |
# host 192.168.0.11 | |
# <secondary> | |
# host 192.168.0.12 | |
# </secondary> | |
#</match> | |
## match tag=myapp.** and forward and write to file | |
#<match myapp.**> | |
# type copy | |
# <store> | |
# type forward | |
# host 192.168.0.13 | |
# buffer_type file | |
# buffer_path /var/log/fluent/myapp-forward | |
# retry_limit 50 | |
# flush_interval 10s | |
# </store> | |
# <store> | |
# type file | |
# path /var/log/fluent/myapp | |
# </store> | |
#</match> | |
## match fluent's internal events | |
#<match fluent.**> | |
# type null | |
#</match> | |
## match not matched logs and write to file | |
#<match **> | |
# type file | |
# path /var/log/fluent/else | |
# compress gz | |
#</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment