Last active
September 6, 2015 04:18
-
-
Save rhoboro/c8f54f1ee757502e2cfb 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
<source> | |
type forward | |
port 24224 | |
</source> | |
<match *.*> | |
type stdout // /var/log/td-agent/td-agent.logに追記されていく | |
</match> |
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
<source> | |
type tail | |
path /var/log/messages | |
pos_file /var/log/td-agent/tmp/syslog.log.pos // どこまで読み込んだかを保存しておくファイル | |
tag syslog.messages // tailで引っかかったログにつけるタグ | |
format syslog | |
</source> | |
<source> | |
type tail | |
path /var/log/nginx/access.log | |
pos_file /var/log/td-agent/tmp/nginx.log.pos | |
tag nginx.access | |
format nginx // 一応ログは送信できてるけど、invalid time formatエラーになる。 | |
</source> | |
<source> | |
type tail | |
path /var/log/nginx/error.log | |
pos_file /var/log/td-agent/tmp/nginx.log.pos | |
tag nginx.error | |
format /^(?<time>[^ ]+ [^ ]+) \[(?<log_level>.*)\] (?<pid>\d*).(?<tid>[^:]*): (?<message>.*)$/ | |
</source> | |
<match *.*> | |
type forward | |
<server> | |
host 192.168.0.1 | |
port 24224 | |
</server> | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment