Skip to content

Instantly share code, notes, and snippets.

@jacopen
Last active January 2, 2016 12:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jacopen/8302312 to your computer and use it in GitHub Desktop.
Save jacopen/8302312 to your computer and use it in GitHub Desktop.
minecraftのログをIRCに流すfluentdのコンフィグ
<source>
type tail
path /home/jacopen/minecraft/data/vanilla/logs/latest.log
format /^\[.*\]\s\[.*\]:\s(?<log>.*)$/
time_format %d/%b/%Y:%H:%M:%S %z
tag minecraft.log
pos_file /var/log/td-agent/minecraft.pos
</source>
<match minecraft.log>
type rewrite_tag_filter
rewriterule1 log ^\<.*\>\s.*$ minecraft.log.talk
rewriterule2 log ^.*\sjoined\sthe\sgame$ minecraft.log.join
rewriterule3 log ^.*\sleft\sthe\sgame$ minecraft.log.left
</match>
<match minecraft.log.left>
type ikachan
host localhost
port 4979
channel udcp
out_keys log
message Minecraft(Vanilla)からログアウトしました。 %s
</match>
<match minecraft.log.join>
type ikachan
host localhost
port 4979
channel udcp
out_keys log
message Minecraft(Vanilla) にログインしました。 %s
</match>
<match minecraft.log.talk>
type ikachan
host localhost
port 4979
channel udcp
out_keys log
message Minecraft(Vanilla) %s
</match>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment