목차
Life cycle of an Event
Setup
Fluentd uses a main configuration file to connect all of of it's components.
- defines inputs which are called listeners.
- matching rules are also setup within the main conf file for routing data
- Outputs are defined for rules to route data to a specific output
Inputs
comprised of three components
- Tags, Time, Record
Filters
Rules are implemented to aggregate input data from inputs
Matches
matching provides an action to take place when a match of a specified event occurs.
(Matches는 특정 이벤트가 일치 할 때 수행되는 조치를 제공합니다.)
- Sending output to other systems is the most common event matching
- Matching is comprised of a match directive and must include a:
. Match pattern
. @type parameter
Labels
Labelling provides grouping of filters and output for simplifying tag handling
- The label directive is used to support event flow separation without a tag prefix
컴포넌트
Engine을 제외한 나머지는 플러그인 형태로 제공됨
- Input
- Parser
- Engine
- Filter
- Buffer
- Output
- Formatter
Input
로그를 수집하는 플러그인
- 다양한 로그 소스를 지원
- 확장 플러그인을 통해 다양한 포맷의 데이터 수집 가능
Parser
Input 플러그인을 통해 읽은 데이터 포맷이 Fluentd에서 지원하지 않는 경우 Parser 플러그인을 선택적으로 사용 가능
- apache, nginx, syslog 등 다양한 포맷의 데이터 파싱 플러그인 제공
(Input을 위한 포맷을 지정)
Filter
읽어들인 데이터를 output으로 보내기 전에 아래 기능을 수행
- 필터링
- 데이터 필드 추가
- 데이터 필드 삭제 또는 특정 필드 마스킹
Output
데이터를 데이터 보관소에 저장 (AWS S3 등)
Formatter
데이터를 저장소에 쓸 때 데이터의 포맷을 정의
(Output을 위한 포맷을 지정)
Buffer
Input에서 들어온 데이터를 중간에 Buffer를 둬서 Throttling 가능
데이터 구조
- Time : 생성 시간
- Record : JSON 형태의 로그 데이터 내용
- Tag : 데이터의 분류, Tag에 따라 로그에 대한 필터링, 라우팅과 같은 플러그인이 적용
출처
분산 로그 & 데이타 수집기 Fluentd
분산 로그 수집기 Fluentd 소개 조대협 (http://bcho.tistory.com) 요즘 들어 빅데이타 분석 관련 기술들을 보다보니, 역시나 여러 데이타 소스에서 데이타를 수집해 오는 부분이 여러 데이타 소스를 커버
bcho.tistory.com
https://www.youtube.com/watch?v=Jl-F9azcyow
'Devops > Logging' 카테고리의 다른 글
Docker 자동으로 기동시키기 (0) | 2021.02.08 |
---|---|
[Fluentd] filter_parser plugin에 대하여 (0) | 2020.05.23 |