「Fluentd」:修訂間差異
跳至導覽
跳至搜尋
第11行: | 第11行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
curl https://packages.treasuredata.com/GPG-KEY-td-agent | sudo apt-key add -; echo "deb http://packages.treasuredata.com/4/ubuntu/$(lsb_release -cs)/ $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/treasure-data.list; sudo apt update; sudo apt install -y td-agent | curl https://packages.treasuredata.com/GPG-KEY-td-agent | sudo apt-key add -; echo "deb http://packages.treasuredata.com/4/ubuntu/$(lsb_release -cs)/ $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/treasure-data.list; sudo apt update; sudo apt install -y td-agent | ||
</syntaxhighlight> | |||
== 設定 == | |||
在<code>/etc/td-agent/td-agent.conf</code>內: | |||
<syntaxhighlight lang="apache"> | |||
# | |||
<source> | |||
@type http | |||
port 9880 | |||
bind 127.0.0.1 | |||
add_remote_addr true | |||
</source> | |||
<match **> | |||
@type file | |||
path /var/log/fluent/ | |||
</match> | |||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2021年9月20日 (一) 18:31 的修訂
Fluent是一套Log處理軟體。
簡介
我是拿來跑server端(接收端)而非client端(發送端)。
安裝
在Ubuntu上安裝:
curl https://packages.treasuredata.com/GPG-KEY-td-agent | sudo apt-key add -; echo "deb http://packages.treasuredata.com/4/ubuntu/$(lsb_release -cs)/ $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/treasure-data.list; sudo apt update; sudo apt install -y td-agent
設定
在/etc/td-agent/td-agent.conf
內:
#
<source>
@type http
port 9880
bind 127.0.0.1
add_remote_addr true
</source>
<match **>
@type file
path /var/log/fluent/
</match>
相關連結
外部連結
- 官方網站 (英文)