[Fluentd] 6. 서버간 연동

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

서버간 연동

aggregator 서버

<source>
  @type forward
  @id input_forward
  port 24232
  bind 0.0.0.0
</source>

<match nginx.**>
    @type stdout
    @id output_nginx

    @log_level debug
</match>

forwarder 서버

<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>
</source>

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

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

  <parse>
    @type nginx
  </parse>
</source>
#############################################

<label @NGINX_LOG>
  <match nginx.*>
    @type forward
    @id output_nginx

    send_timeout 60s
    recover_wait 10s
    hard_timeout 60s

    <server>
      name main_node
      host 192.168.10.7
      port 24232
      weight 60
    </server>

    <secondary>
      @type file
      path /var/log/td-agent/td-agnt-nginx-fail.log
    </secondary>

    @log_level debug
  </match>
</label>

<source>
  @type forward
  @id input_forward
  port 24232
  bind 0.0.0.0
</source>

<match apps.**>
    @type forward
    @id output_apps

    send_timeout 60s
    recover_wait 10s
    hard_timeout 60s

    <server>
      name main_node
      host 192.168.10.7
      port 24232
      weight 60
    </server>

    <secondary>
      @type file
      path /var/log/td-agent/td-agnt-nginx-fail.log
    </secondary>
</match>

728x90
반응형
저작자표시 비영리 (새창열림)
'Infrastructure/Fluentd' 카테고리의 다른 글
  • [Fluentd] 8. Prometheus 연동
  • [Fluentd] 7. Nginx 연동
  • [Fluentd] 5. Output plugin
  • [Fluentd] 4. Input plugin
상쾌한기분
상쾌한기분
  • 상쾌한기분
    상쾌한기분
    상쾌한기분
  • 전체
    오늘
    어제
    • 분류 전체보기 (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 방문
  • 링크

  • 공지사항

  • 인기 글

  • 태그

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

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
상쾌한기분
[Fluentd] 6. 서버간 연동
상단으로

티스토리툴바