[Fluentd] 1. 설치

2021. 5. 6. 11:39·Infrastructure/Fluentd
반응형

Before Installation

Increase the Maximum Number of File Descriptors

# 확인
$ ulimit -n
65535

# 서버마다 다른지 모르겠지만, CentOS는 1024가 default
# 아래 파일 내용 추가
$ vi /etc/security/limits.conf

root soft nofile 65536
root hard nofile 65536
* soft nofile 65536
* hard nofile 65536

systemd 서비스 사용중인 os는 
'LimitNOFILE=65536'
추가, 이외 os 는 default 로 set 되어 있음

Optimize the Network Kernel Parameters

$ vi /etc/sysctl.conf

net.core.somaxconn = 1024
net.core.netdev_max_backlog = 5000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_wmem = 4096 12582912 16777216
net.ipv4.tcp_rmem = 4096 12582912 16777216
net.ipv4.tcp_max_syn_backlog = 8096
net.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.ip_local_port_range = 10240 65535

$ sysctl -p

Install

Install by RPM Package (Red Hat Linux)

td-agent v4 버전 사용

Executing this script will automatically install td-agent on your machine. 
This shell script registers a new rpm repository at /etc/yum.repos.d/td.repo and installs td-agent.

$ curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent4.sh | sh

Lanuch

$ systemctl start td-agent
$ systemctl status td-agent

Sample Test Log via HTTP

$ curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test

$ cat /var/log/td-agent/td-agent.log

Configuration

# 설정파일
/etc/td-agent/td-agent.conf

# 로그파일
/var/log/td-agent/td-agent.log
728x90
반응형
저작자표시 비영리 (새창열림)
'Infrastructure/Fluentd' 카테고리의 다른 글
  • [Fluentd] 5. Output plugin
  • [Fluentd] 4. Input 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 방문
  • 링크

  • 공지사항

  • 인기 글

  • 태그

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

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
상쾌한기분
[Fluentd] 1. 설치
상단으로

티스토리툴바