「Fluentbit」:修訂間差異
跳至導覽
跳至搜尋
第7行: | 第7行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
wget -qO - https://packages.fluentbit.io/fluentbit.key | sudo apt-key add -; echo "deb https://packages.fluentbit.io/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y td-agent-bit; sudo apt clean | wget -qO - https://packages.fluentbit.io/fluentbit.key | sudo apt-key add -; echo "deb https://packages.fluentbit.io/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y td-agent-bit; sudo apt clean | ||
</syntaxhighlight> | |||
== 設定 == | |||
<syntaxhighlight lang="text"> | |||
[SERVICE] | |||
flush 5 | |||
daemon off | |||
log_level info | |||
parsers_file parsers.conf | |||
plugins_file plugins.conf | |||
http_server off | |||
http_listen 0.0.0.0 | |||
http_port 2020 | |||
storage.metrics on | |||
[INPUT] | |||
name tail | |||
path /var/log/*.log | |||
[OUTPUT] | |||
name http | |||
http_User user | |||
http_Passwd abcdefghijklmnopqrstuvwx | |||
host fluent.example.com | |||
port 443 | |||
tls on | |||
uri / | |||
format json | |||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2021年9月20日 (一) 18:24 的修訂
Fluentbit是一套Log處理軟體,以佔用資源最佳化。
安裝
在Ubuntu上安裝:
wget -qO - https://packages.fluentbit.io/fluentbit.key | sudo apt-key add -; echo "deb https://packages.fluentbit.io/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y td-agent-bit; sudo apt clean
設定
[SERVICE]
flush 5
daemon off
log_level info
parsers_file parsers.conf
plugins_file plugins.conf
http_server off
http_listen 0.0.0.0
http_port 2020
storage.metrics on
[INPUT]
name tail
path /var/log/*.log
[OUTPUT]
name http
http_User user
http_Passwd abcdefghijklmnopqrstuvwx
host fluent.example.com
port 443
tls on
uri /
format json
相關連結
外部連結
- 官方網站 (英文)