본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

빌드 및 설치 (Build and install)

원문 보기 위키 갱신

Fluent Bit는 빌드 시스템으로 CMake를 사용해요.

출처: 문서

본문

요구 사항

Fluent Bit를 소스에서 빌드하고 설치하려면 다음 패키지도 설치해야 해요.

  • bison
  • build-essentials
  • cmake (버전 3.31.6 이상)
  • flex
  • libssl-dev
  • libyaml-dev
  • pkg-config

추가로 일부 입력 또는 출력 플러그인은 추가 구성 요소에 의존할 수 있어요. 예를 들어 일부 플러그인은 Kafka가 필요해요.

환경 준비

CMake가 어떻게 동작하는지 이미 안다면 이 섹션은 건너뛰고 사용 가능한 빌드 옵션을 확인해도 돼요.

다음 단계는 기본 옵션으로 프로젝트를 빌드하고 설치하는 방법을 설명해요.

  1. Fluent Bit 소스 안의 build/ 디렉터리로 이동해요.

    cd build/
    
  2. CMake가 루트 경로가 어디에 있는지 지정하면서 프로젝트를 구성하게 해요.

    cmake ../
    

    이 명령은 다음과 유사한 일련의 결과를 표시해요.

    -- The C compiler identification is GNU 4.9.2
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- The CXX compiler identification is GNU 4.9.2
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    ...
    -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
    -- Looking for accept4
    -- Looking for accept4 - not found
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/edsiper/coding/fluent-bit/build
    
  3. make 명령으로 컴파일 과정을 시작해요.

    make
    

    이 명령은 다음과 유사한 결과를 표시해요.

    Scanning dependencies of target msgpack
    [  2%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/unpack.c.o
    [  4%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/objectc.c.o
    [  7%] Building C object lib/msgpack-1.1.0/CMakeFiles/msgpack.dir/src/version.c.o
    ...
    [ 19%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_file.c.o
    [ 21%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_rconf.c.o
    [ 23%] Building C object lib/monkey/mk_core/CMakeFiles/mk_core.dir/mk_string.c.o
    ...
    Scanning dependencies of target fluent-bit-static
    [ 66%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_pack.c.o
    [ 69%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_input.c.o
    [ 71%] Building C object src/CMakeFiles/fluent-bit-static.dir/flb_output.c.o
    ...
    Linking C executable ../bin/fluent-bit
    [100%] Built target fluent-bit-bin
    
  4. 시스템에 바이너리를 계속 설치하려면 make install을 사용해요.

    make install
    

    명령이 권한이 부족함을 나타내면 명령 앞에 sudo를 붙여요.

빌드 옵션

Fluent Bit는 활성화하거나 비활성화할 수 있는 구성 가능한 옵션을 CMake에 제공해요.

일반 옵션

Option Description Default
FLB_ALL Enable all features available No
FLB_ARROW Build with Apache Arrow support No
FLB_AVRO_ENCODER Build with Avro encoding support No
FLB_AWS Enable AWS support Yes
FLB_AWS_ERROR_REPORTER Build with AWS error reporting support No
FLB_BENCHMARKS Enable benchmarks No
FLB_BINARY Build executable Yes
FLB_CHUNK_TRACE Enable chunk traces Yes
FLB_COVERAGE Build with code-coverage No
FLB_CONFIG_YAML Enable YAML configuration support Yes
FLB_CORO_STACK_SIZE Set coroutine stack size
FLB_CUSTOM_CALYPTIA Enable Calyptia Support Yes
FLB_ENFORCE_ALIGNMENT Enable limited platform specific aligned memory access No
FLB_EXAMPLES Build examples Yes
FLB_HTTP_SERVER Enable HTTP Server Yes
FLB_INOTIFY Enable Inotify support Yes
FLB_JEMALLOC Build with Jemalloc support No
FLB_KAFKA Enable Kafka support Yes
FLB_LUAJIT Enable Lua scripting support Yes
FLB_METRICS Enable metrics support Yes
FLB_MTRACE Enable mtrace support No
FLB_PARSER Build with Parser support Yes
FLB_POSIX_TLS Force POSIX thread storage No
FLB_PROFILES Enable profiles support Yes
FLB_PROTOBUF_ENCODER Build Kafka runtime Protobuf encoding support. Supported in v5.1.3 or later. No
FLB_PROXY_GO Enable Go plugins support Yes
FLB_RECORD_ACCESSOR Enable record accessor Yes
FLB_REGEX Build with Regex support Yes
FLB_RELEASE Build with release mode (-O2 -g -DNDEBUG) No
FLB_SHARED_LIB Build shared library Yes
FLB_SIGNV4 Enable AWS Signv4 support Yes
FLB_SIMD Enable SIMD support No
FLB_SQLDB Enable SQL embedded database support Yes
FLB_STATIC_CONF Build binary using static configuration files. The value of this option must be a directory containing configuration files.
FLB_STREAM_PROCESSOR Enable Stream Processor Yes
FLB_TLS Build with SSL/TLS support Yes
FLB_UNICODE_ENCODER Build with Unicode (UTF-16LE, UTF-16BE) encoding support Yes (if C++ compiler found)
FLB_UTF8_ENCODER Build with UTF8 encoding support Yes
FLB_WASM Build with Wasm runtime support Yes
FLB_WASM_STACK_PROTECT Build with WASM runtime with strong stack protector flags No
FLB_WAMRC Build with Wasm AOT compiler executable No
FLB_WINDOWS_DEFAULTS Build with predefined Windows settings Yes
FLB_ZIG Enable zig integration Yes

FLB_PROTOBUF_ENCODER는 Fluent Bit 버전 5.1.3 이상에서 사용할 수 있어요. 이를 활성화하려면 libprotoc 개발 라이브러리를 포함한 Protobuf 3.12 이상이 필요해요. libprotoc가 없으면 CMake는 FLB_PROTOBUF_ENCODER requires libprotoc development libraries라는 메시지로 멈춰요. 이 옵션은 Kafka 출력 플러그인에 C++ 소스 파일을 추가하고 C++11이 필요하므로, 빌드에는 C++ 컴파일러가 필요해요.

개발 옵션

Option Description Default
FLB_BACKTRACE Enable stack trace support Yes
FLB_DEBUG Build with debug mode (-g) No
FLB_SMALL Optimize for small size No
FLB_TESTS_INTERNAL Enable internal tests No
FLB_TESTS_INTERNAL_FUZZ Enable internal fuzz tests No
FLB_TESTS_OSSFUZZ Enable OSS-Fuzz build No
FLB_TESTS_RUNTIME Enable runtime tests No
FLB_TRACE Enable trace mode No
FLB_VALGRIND Enable Valgrind support No

최적화 옵션

Option Description Default
FLB_MSGPACK_TO_JSON_INIT_BUFFER_SIZE Determine initial buffer size for msgpack to json conversion in terms of memory used by payload. 2.0
FLB_MSGPACK_TO_JSON_REALLOC_BUFFER_SIZE Determine percentage of reallocation size when msgpack to json conversion buffer runs out of memory. 0.1

입력 플러그인

입력 플러그인은 네트워크 인터페이스, 일부 내장 메트릭, 또는 특정 입력 장치 같은 특정 소스 유형에서 정보를 수집해요.

사용 가능한 입력 플러그인은 다음과 같아요.

Option Description Default
FLB_IN_BLOB Enable Blob input plugin On
FLB_IN_COLLECTD Enable Collectd input plugin On
FLB_IN_CPU Enable CPU input plugin On
FLB_IN_DISK Enable Disk I/O Metrics input plugin On
FLB_IN_DOCKER Enable Docker input plugin On
FLB_IN_DOCKER_EVENTS Enable Docker events input plugin On
FLB_IN_DUMMY Enable Dummy input plugin On
FLB_IN_EBPF Enable Linux eBPF input plugin Off
FLB_IN_ELASTICSEARCH Enable Elasticsearch (Bulk API) input plugin On
FLB_IN_EXEC Enable Exec input plugin On
FLB_IN_EXEC_WASI Enable Exec WASI input plugin On
FLB_IN_FLUENTBIT_METRICS Enable Fluent Bit metrics input plugin On
FLB_IN_FLUENTBIT_LOGS Enable Fluent Bit internal logs input plugin On
FLB_IN_FORWARD Enable Forward input plugin On
FLB_IN_GPU_METRICS Enable GPU metrics input plugin On
FLB_IN_HEAD Enable Head input plugin On
FLB_IN_HEALTH Enable Health input plugin On
FLB_IN_HTTP Enable HTTP input plugin On
FLB_IN_KAFKA Enable Kafka input plugin On
FLB_IN_KMSG Enable Kernel log input plugin On
FLB_IN_KUBERNETES_EVENTS Enable Kubernetes Events input plugin On
FLB_IN_MEM Enable Memory input plugin On
FLB_IN_MQTT Enable MQTT Broker input plugin On
FLB_IN_NETIF Enable Network I/O metrics input plugin On
FLB_IN_NGINX_EXPORTER_METRICS Enable NGINX metrics input plugin On
FLB_IN_NODE_EXPORTER_METRICS Enable Node exporter metrics input plugin On
FLB_IN_OPENTELEMETRY Enable OpenTelemetry input plugin On
FLB_IN_PODMAN_METRICS Enable Podman metrics input plugin On
FLB_IN_PROC Enable Process input plugin On
FLB_IN_PROCESS_EXPORTER_METRICS Enable Process exporter metrics input plugin On
FLB_IN_PROMETHEUS_REMOTE_WRITE Enable Prometheus remote write input plugin On
FLB_IN_PROMETHEUS_SCRAPE_METRICS Enable Prometheus scrape metrics input plugin On
FLB_IN_PROMETHEUS_TEXTFILE Enable Prometheus textfile input plugin On
FLB_IN_RANDOM Enable Random input plugin On
FLB_IN_SERIAL Enable Serial input plugin On
FLB_IN_SPLUNK Enable Splunk input plugin On
FLB_IN_STATSD Enable StatsD input plugin On
FLB_IN_STDIN Enable Standard input plugin On
FLB_IN_SYSLOG Enable Syslog input plugin On
FLB_IN_SYSTEMD Enable Systemd input plugin On
FLB_IN_TAIL Enable Tail input plugin On
FLB_IN_TCP Enable TCP input plugin On
FLB_IN_THERMAL Enable Thermal input plugin On
FLB_IN_UDP Enable UDP input plugin On
FLB_IN_WINLOG Enable Windows Event Log input plugin (Windows Only) Off
FLB_IN_WINEVTLOG Enable Windows Event Log input plugin using winevt.h API (Windows Only) Off
FLB_IN_WINDOWS_EXPORTER_METRICS Enable Windows exporter metrics input plugin On
FLB_IN_WINSTAT Enable Windows system statistics input plugin Off

프로세서 플러그인

프로세서 플러그인은 이벤트를 수정, 강화, 또는 폐기할 수 있도록 프로세서 파이프라인 안에서 이벤트를 처리해요.

다음 표는 사용 가능한 프로세서를 설명해요.

Option Description Default
FLB_PROCESSOR_CONTENT_MODIFIER Enable content modifier processor On
FLB_PROCESSOR_LABELS Enable metrics label manipulation processor On
FLB_PROCESSOR_METRICS_SELECTOR Enable metrics selector processor On
FLB_PROCESSOR_OPENTELEMETRY_ENVELOPE Enable OpenTelemetry envelope processor On
FLB_PROCESSOR_SAMPLING Enable sampling processor On
FLB_PROCESSOR_SQL Enable SQL processor On
FLB_PROCESSOR_TDA Enable Topological Data Analysis (TDA) processor On

필터 플러그인

필터 플러그인은 레코드를 수정, 강화, 또는 폐기할 수 있게 해 줘요.

다음 표는 이 버전에서 사용 가능한 필터를 설명해요.

Option Description Default
FLB_FILTER_AWS Enable AWS metadata filter On
FLB_FILTER_CHECKLIST Enable Checklist filter On
FLB_FILTER_ECS Enable AWS ECS metadata filter On
FLB_FILTER_EXPECT Enable Expect data test filter On
FLB_FILTER_GIOIP2 Enable Geoip2 filter On
FLB_FILTER_GREP Enable Grep filter On
FLB_FILTER_KUBERNETES Enable Kubernetes metadata filter On
FLB_FILTER_LOG_TO_METRICS Enable Log derived metrics filter On
FLB_FILTER_LUA Enable Lua scripting filter On
FLB_FILTER_MODIFY Enable Modify filter On
FLB_FILTER_MULTILINE Enable Multiline stack trace filter On
FLB_FILTER_NEST Enable Nest filter On
FLB_FILTER_NIGHTFALL Enable Nightfall filter On
FLB_FILTER_PARSER Enable Parser filter On
FLB_FILTER_RECORD_MODIFIER Enable Record Modifier filter On
FLB_FILTER_REWRITE_TAG Enable Rewrite Tag filter On
FLB_FILTER_STDOUT Enable Stdout filter On
FLB_FILTER_SYSINFO Enable Sysinfo filter On
FLB_FILTER_TENSORFLOW Enable Tensorflow filter Off
FLB_FILTER_THROTTLE Enable Throttle filter On
FLB_FILTER_TYPE_CONVERTER Enable Type Converter filter On
FLB_FILTER_WASM Enable Wasm filter On

출력 플러그인

출력 플러그인은 정보를 어떤 외부 인터페이스, 서비스, 또는 터미널로 flush할 수 있게 해 줘요.

다음 표는 사용 가능한 출력 플러그인을 설명해요. FLB_OUT_ARVANCLOUD_CLOUDLOGS는 Fluent Bit 버전 5.1.3 이상에서 사용할 수 있어요.

Option Description Default
FLB_OUT_ARVANCLOUD_CLOUDLOGS Enable ArvanCloud CloudLogs output plugin On
FLB_OUT_AZURE Enable Microsoft Azure output plugin On
FLB_OUT_AZURE_BLOB Enable Microsoft Azure storage blob output plugin On
FLB_OUT_AZURE_KUSTO Enable Azure Data Explorer (Kusto) output plugin On
FLB_OUT_AZURE_LOGS_INGESTION Enable Azure Log Ingestion output plugin On
FLB_OUT_BIGQUERY Enable Google BigQuery output plugin On
FLB_OUT_CHRONICLE Enable Google Chronicle output plugin On
FLB_OUT_CLOUDWATCH_LOGS Enable Amazon CloudWatch output plugin On
FLB_OUT_COUNTER Enable Counter output plugin On
FLB_OUT_DATADOG Enable Datadog output plugin On
FLB_OUT_ES Enable Elastic Search output plugin On
FLB_OUT_EXIT Enable Exit output plugin On
FLB_OUT_FILE Enable File output plugin On
FLB_OUT_FLOWCOUNTER Enable Flow counter output plugin On
FLB_OUT_FORWARD Enable Fluentd output plugin On
FLB_OUT_GELF Enable GELF output plugin On
FLB_OUT_HTTP Enable HTTP output plugin On
FLB_OUT_INFLUXDB Enable InfluxDB output plugin On
FLB_OUT_KAFKA Enable Kafka output On
FLB_OUT_KAFKA_REST Enable Kafka REST Proxy output plugin On
FLB_OUT_KINESIS_FIREHOSE Enable Amazon Kinesis Data Firehose output plugin On
FLB_OUT_KINESIS_STREAMS Enable Amazon Kinesis Data Streams output plugin On
FLB_OUT_LIB Enable Library output plugin On
FLB_OUT_LOGDNA Enable LogDNA output plugin On
FLB_OUT_LOKI Enable Loki output plugin On
FLB_OUT_NATS Enable NATS output plugin On
FLB_OUT_NRLOGS Enable New Relic output plugin On
FLB_OUT_NULL Enable NULL output plugin On
FLB_OUT_OPENSEARCH Enable OpenSearch output plugin On
FLB_OUT_OPENTELEMETRY Enable OpenTelemetry output plugin On
FLB_OUT_ORACLE_LOG_ANALYTICS Enable Oracle Cloud Infrastructure Logging output plugin On
FLB_OUT_PGSQL Enable PostgreSQL output plugin Off
FLB_OUT_PLOT Enable Plot output plugin On
FLB_OUT_PROMETHEUS_EXPORTER Enable Prometheus exporter output plugin On
FLB_OUT_PROMETHEUS_REMOTE_WRITE Enable Prometheus remote write output plugin On
FLB_OUT_S3 Enable Amazon S3 output plugin On
FLB_OUT_SKYWALKING Enable Apache Skywalking output plugin On
FLB_OUT_SLACK Enable Slack output plugin On
FLB_OUT_SPLUNK Enable Splunk output plugin On
FLB_OUT_STACKDRIVER Enable Stackdriver output plugin On
FLB_OUT_STDOUT Enable STDOUT output plugin On
FLB_OUT_SYSLOG Enable Syslog output plugin On
FLB_OUT_TD Enable Treasure Data output plugin On
FLB_OUT_TCP Enable TCP/TLS output plugin On
FLB_OUT_UDP Enable UDP output plugin On
FLB_OUT_VIVO_EXPORTER Enable Vivo exporter output plugin On
FLB_OUT_WEBSOCKET Enable WebSocket output plugin On

더 알아보기 (Learn more)