728x90
td-agent-bit 설치
td-agent-bit.repo 저장소 등록 - centos7
cat <<EOF > /etc/yum.repos.d/td-agent-bit.repo
[td-agent-bit]
name = TD Agent Bit
baseurl = http://packages.fluentbit.io/centos/7
gpgcheck=1
gpgkey=http://packages.fluentbit.io/fluentbit.key
enabled=1
EOF
td-agent-bit 설치
yum install -y td-agent-bit
td-agent-bit 서비스 등록 및 시작
systemctl --now enable td-agent-bit
td-agent-bit 서비스 시작 상태 확인
systemctl status td-agent-bit
(or)
systemctl status td-agent-bit --no-pager
td-agent-bit.conf 설정
vim /etc/td-agent-bit/td-agent-bit.conf
[SERVICE]
# Flush
# =====
# set an interval of seconds before to flush records to a destination
flush 1
# Daemon
# ======
# instruct Fluent Bit to run in foreground or background mode.
daemon Off
# Log_Level
# =========
# Set the verbosity level of the service, values can be:
#
# - error
# - warning
# - info
# - debug
# - trace
#
# by default 'info' is set, that means it includes 'error' and 'warning'.
log_level info
# Parsers File
# ============
# specify an optional 'Parsers' configuration file
parsers_file parsers.conf
# Plugins File
# ============
# specify an optional 'Plugins' configuration file to load external plugins.
plugins_file plugins.conf
# HTTP Server
# ===========
# Enable/Disable the built-in HTTP Server for metrics
http_server Off
http_listen 0.0.0.0
http_port 2020
# Storage
# =======
# Fluent Bit can use memory and filesystem buffering based mechanisms
#
# - https://docs.fluentbit.io/manual/administration/buffering-and-storage
#
# storage metrics
# ---------------
# publish storage pipeline metrics in '/api/v1/storage'. The metrics are
# exported only if the 'http_server' option is enabled.
#
storage.metrics on
# storage.path
# ------------
# absolute file system path to store filesystem data buffers (chunks).
#
# storage.path /tmp/storage
# storage.sync
# ------------
# configure the synchronization mode used to store the data into the
# filesystem. It can take the values normal or full.
#
# storage.sync normal
# storage.checksum
# ----------------
# enable the data integrity check when writing and reading data from the
# filesystem. The storage layer uses the CRC32 algorithm.
#
# storage.checksum off
# storage.backlog.mem_limit
# -------------------------
# if storage.path is set, Fluent Bit will look for data chunks that were
# not delivered and are still in the storage layer, these are called
# backlog data. This option configure a hint of maximum value of memory
# to use when processing these records.
#
# storage.backlog.mem_limit 5M
[INPUT]
name cpu
tag cpu.local
# Read interval (sec) Default: 1
interval_sec 1
[OUTPUT]
name stdout
match *
참고URL
- td-agent-bit : https://docs.fluentbit.io/manual/v/1.0/installation/redhat_centos
728x90
'리눅스' 카테고리의 다른 글
cronolog를 컴파일하여 설치하고 로그를 설정하는 방법 (0) | 2023.01.27 |
---|---|
도커 컴포즈 설치(docker-compose install) (0) | 2023.01.27 |
[draft] systemctl status 명령어 (0) | 2023.01.27 |
[draft] Consul 클러스터를 구성하는 방법 (0) | 2023.01.26 |
[draft] 우분투에 Consul을 설치하고 설정하는 방법 (0) | 2023.01.26 |