Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.