[Fluentd] 4. Input plugin

2021. 5. 11. 14:47·Infrastructure/Fluentd
반응형

Input Plugin

https://docs.fluentd.org/input

tail

tail 은 꼬리로, 텍스트 파일의 꼬리를 쫓는다. 리눅스 커맨드 tail 과 비슷하다.

아래는 Nginx access log tail 샘플

<source>
  @type tail
  @label @NGINX_LOG
  @id NGINX_ACCESS_LOG

  tag nginx.access
  path /var/log/nginx/access.log
  pos_file /var/log/td-agent/nginx-access.log.pos

  <parse>
    @type nginx
  </parse>
  @log_level debug
</source>

forward

forward 는 포트 열고 통신 대기한다고 생각하면 됨
fluentd -> fluentd
fluentd -> prometheus

<source>
  @type forward
  port 24224
  bind 0.0.0.0
</source>

http

http 는 HTTP request 로 데이터 전송 가능하게 해줌

<source>
  @type http
  port 9880
  bind 0.0.0.0
  body_size_limit 32m
  keepalive_timeout 10s
</source>
# Post a record with the tag "app.log"
$ curl -X POST -d 'json={"foo":"bar"}' http://localhost:9880/app.log

$ curl -X POST -d 'json={"foo":"bar"}' \
  http://localhost:9880/test.tag?time=1518756037.3137116

var form = new FormData();
form.set('json', JSON.stringify({"foo": "bar"}));

var req = new XMLHttpRequest();
req.open('POST', 'http://localhost:9880/debug.log');
req.send(form);
728x90
반응형
저작자표시 비영리 (새창열림)
'Infrastructure/Fluentd' 카테고리의 다른 글
  • [Fluentd] 6. 서버간 연동
  • [Fluentd] 5. Output plugin
  • [Fluentd] 3. 설정 파라미터
  • [Fluentd] 2. 설정 개요
상쾌한기분
상쾌한기분
  • 상쾌한기분
    상쾌한기분
    상쾌한기분
  • 전체
    오늘
    어제
    • 분류 전체보기 (251)
      • Python (44)
        • Python (26)
        • Django (6)
        • Flask (4)
        • Open Source (6)
      • Kotlin & Java (5)
        • Spring (2)
        • 프로젝트 (1)
      • Go (11)
      • Database (24)
        • MySQL (21)
        • Redis (3)
      • Infrastructure (2)
        • CDC (4)
        • Kafka (5)
        • Prometheus (2)
        • Fluentd (11)
        • Docker (1)
        • Airflow (2)
        • VPN (2)
      • IT (26)
        • AI (9)
        • Langchain (8)
        • Web (18)
        • Git (8)
        • 리팩토링 (9)
        • Micro Service Architecture (8)
        • Clean Code (16)
        • Design Pattern (0)
        • 수학 (1)
        • 알고리즘 (14)
      • OS (14)
        • Centos (10)
        • Ubuntu (3)
        • Mac (1)
      • Search Engine (2)
        • ElasticSearch (1)
        • Lucene Solr (1)
      • PHP (2)
        • Laravel (1)
        • Codeigniter (1)
  • 블로그 메뉴

    • Github 방문
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    fluentd
    Redis
    백준
    LLM
    ollama
    http
    git
    CDC
    MYSQL
    go
    prompt
    오블완
    Kafka
    Golang
    python
    docker
    performance
    Langchain
    티스토리챌린지
    파이썬
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
상쾌한기분
[Fluentd] 4. Input plugin
상단으로

티스토리툴바