「Fluentbit」:修訂間差異

出自Gea-Suan Lin's Wiki
跳至導覽 跳至搜尋
Gslin留言 | 貢獻
Gslin留言 | 貢獻
 
(未顯示同一使用者於中間所作的 14 次修訂)
第1行: 第1行:
'''Fluentbit'''是一套Log處理軟體。
'''Fluentbit'''是一套Log處理軟體,以佔用資源最佳化。
 
== 簡介 ==
 
我是拿來跑client端(發送端)而非server端(接收端)


== 安裝 ==
== 安裝 ==


在[[Ubuntu]]上安裝:
[[Debian]]或是[[Ubuntu]]上安裝
 
<syntaxhighlight lang="bash">
curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor | sudo tee /usr/share/keyrings/fluentbit-keyring.gpg > /dev/null; echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/$(lsb_release -is | tr A-Z a-z)/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y fluent-bit; sudo apt clean
</syntaxhighlight>
 
== 設定 ==
 
在<code>/etc/fluent-bit/td-fluent-bit.conf</code>內的設定,這邊沿用了本來的預設值:
 
<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 lang="bash">
<syntaxhighlight lang="bash">
wget -qO - https://packages.fluentbit.io/fluentbit.key | sudo apt-key add -; echo "deb https://packages.fluentbit.io/ubuntu/focal $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y td-agent-bit
sudo systemctl enable fluent-bit; sudo service fluent-bit restart
</syntaxhighlight>
</syntaxhighlight>


== 相關連結 ==
== 相關連結 ==


* [[Flientd]]
* [[Fluentd]]


== 外部連結 ==
== 外部連結 ==

於 2025年3月5日 (三) 07:08 的最新修訂

Fluentbit是一套Log處理軟體,以佔用資源最佳化。

簡介

我是拿來跑client端(發送端)而非server端(接收端)。

安裝

Debian或是Ubuntu上安裝:

curl https://packages.fluentbit.io/fluentbit.key | gpg --dearmor | sudo tee /usr/share/keyrings/fluentbit-keyring.gpg > /dev/null; echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/$(lsb_release -is | tr A-Z a-z)/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/fluentbit.list; sudo apt update; sudo apt install -y fluent-bit; sudo apt clean

設定

/etc/fluent-bit/td-fluent-bit.conf內的設定,這邊沿用了本來的預設值:

[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

接著是讓他開機啟動:

sudo systemctl enable fluent-bit; sudo service fluent-bit restart

相關連結

外部連結