모니터링 오픈 소스 중 리얼타임 로그를 얻기 위한 Collector를 찾는 중 Fluentbit를 찾게되었다.
시스템 정보들이나 로그들을 real-time으로 얼마나 가볍게 빠르고 정확하게 모아서 쌓는가가 초점인거 같다.
최종 목표는 도커화하여 쿠버네티스로 배포하는 버전까지 세팅하는 것이다.
아래는 공식 사이트이며 전반적으로 읽어보는 것이 좋다.
어떤 프로그램이든 자료가 없는 경우 읽어서 알아보는 능력이 필요하기 때문이다.
fluentbit 공식 사이트
Fluent Bit
Configuration The service use a simple and human-readable configuration file, it allow to specify how it will behave, which features to enable and how Routing is performed. Optionally Fluent Bit can run from the command line without it.
fluentbit.io
아래는 fluentbit의 특징 들이다.
공식 메뉴얼도 잘 정리되어 있으니 천천히 읽어 나가보자.
공식 메뉴얼
https://docs.fluentbit.io/manual/
Introduction
docs.fluentbit.io
역시 소개를 하고 왜 만들었고 필요한지가 제일 중요한거 같다.
Different sources of information.
Different data formats.
Multiple destinations.
Fluentd와 Fluentbit란?
Fluentd | Fluent Bit | |
Scope | Containers / Servers | Containers / Servers |
Language | C & Ruby | C |
Memory | ~40MB | ~450KB |
Performance | High Performance | High Performance |
Dependencies | Ruby Gem | Zero dependencies |
Plugins | More than 650 plugins avaiable | Aroud 35 plugins available |
License | Apache License v2.0 | Apache license v2.0 |
지원 플랫폼
OS | Distribution | Architecture |
Linux | Centos 7 | X86_64 |
Debian 8 (Jessie) | ||
Debian 9 (Stretch) | ||
Raspbian 8 (Debian Jessie) | ||
Raspbian 9 (Debian Stretch) | ||
Ubuntu 16.04 (Xenial Xerus) | ||
Ubuntu 18.04 (Bionic Beaver) |
CentOS Packege 설치
/etc/yum.repos.d/td-agent-bit.repo 추가
# cat<< EOF >/etc/yum.repos.d/td.repo |
소스빌드는 도커화하느라 해보는 중이라서 편하게 하시려면 위에 패키지 설치로 진행하시는게 좋습니다.
소스 다운로드
$ git clone https://github.com/fluent/fluent-bit |
빌드 방법 참조
https://github.com/fluent/fluent-bit-docs/blob/master/installation/build_install.md
fluent/fluent-bit-docs
Fluent Bit - Official Documentation. Contribute to fluent/fluent-bit-docs development by creating an account on GitHub.
github.com
* 에러
Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)Could NOT find Journald (missing: JOURNALD_LIBRARY JOURNALD_INCLUDE_DIR)
--> yum install -y libsystemd-dev
참조 : https://github.com/fluent/fluent-bit/issues/434
How to use in_systemd_plugin · Issue #434 · fluent/fluent-bit
I want to collect log messages from the Journald daemon on Linux environments, and I find that the Systemd/Journald input plugin has been developed. Yesterday, I got the latest source code from Git...
github.com
CMake Error at /usr/share/cmake/Modules/FindFLEX.cmake:116
--> cmake3 설치로 해결
참조: https://github.com/fluent/fluent-bit/issues/1345
Building from GitHub source does not work on CentOS 7 · Issue #1345 · fluent/fluent-bit
Is there and src.rpm available to build from? I need to fix a bug and make a pull request but I can't get this to build on CentOS 7... ` [root@ip-10-0-0-00 build]# cmake ../ -- The C compiler i...
github.com
centos Could NOT find ZLIB
--> libzlib-devel 설치
참조: https://github.com/mobile-shell/mosh/issues/562
Compiling mosh on CentOS 7: configure cannot find zlib · Issue #562 · mobile-shell/mosh
[slu@localhost mosh]$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdi...
github.com
Could NOT find GTest (missing: GTEST_LIBRARY GTEST_INCLUDE_DIR GTEST_MAIN_LIBRARY)
--> 우분투는 libgtest-dev 설치, Cent는 다음 글을 참조
$ wget http://www.cmake.org/files/v3.6/cmake-3.6.1.tar.gz $ tar -zxvf cmake-3.6.1.tar.gz $ cd cmake-3.6.1 $ ./bootstrap $ make $ make install # \cp를 한 이유는 -f 가 먹히지 않아서 그렇다. # cp에 대한 alias를 확인해 보면 -i가 붙어 있는것을 알 수 있다. # $alias | grep cp # alias cp='cp -i' # 이런 경우 \cp를 하면 alias값이 무시된다. $ \cp -f ./bin/cmake ./bin/cpack ./bin/ctest /bin $ cmake -version cmake version 3.6.1
CMake suite maintained and supported by Kitware (kitware.com/cmake). |
참조: https://stackoverflow.com/questions/24295876/cmake-cannot-find-googletest-required-library-in-ubuntu
CMake cannot find GoogleTest required library in Ubuntu
Similar issue here. This is my CMakeLists.txt: cmake_minimum_required(VERSION 2.6) # Locate GTest find_package(GTest REQUIRED) include_directories(${GTEST_INCLUDE_DIRS}) # Add test cpp file
stackoverflow.com
https://stackoverflow.com/questions/13513905/how-to-set-up-googletest-as-a-shared-library-on-linux
How to set up googleTest as a shared library on Linux
Debian does not provide any precompiled packages for gTest anymore. They suggest you integrate the framework into your project's makefile. But I want to keep my makefile clean. How do I set up gTes...
stackoverflow.com
모니터링 시스템 Prometheus 설치 #2 (docker & grafana ) (0) | 2020.02.18 |
---|---|
fluentd 설치 (CentOS 7) (0) | 2020.01.10 |
fluentd 설정 및 도커화 (CentOS 7) (0) | 2020.01.10 |
모니터링 시스템 Prometheus #1 (설명 및 설치) (0) | 2019.12.17 |
Grafana + Telegraf + InfluxDB 이용한 모니터링 시스템 설치 (0) | 2019.11.19 |
댓글 영역