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
相关连结
外部链接
- 官方网站 (英文)