LoginSignup
2
2

More than 5 years have passed since last update.

fluentdのインストール

Posted at

やってみたのでメモ

前提

  • CentOS7

手順

  1. 予め時刻を合わせる
  2. 必要に応じて、次の行を追加してネットワークカーネルパラメータをチューニングする

    # vi /etc/sysctl.conf
    
    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
    
  3. 次のコマンドを実行する

    # curl -L https://toolbelt.treasuredata.com/sh/install-redhat-td-agent3.sh | sh
    
  4. fluentdを起動する

    # start td-agent.service
    
  5. サンプルを送る

    # curl -X POST -d 'json={"json":"message"}' http://localhost:8888/debug.test
    
  6. ログが記録されているかどうか確認する

    # tail /var/log/td-agent/td-agent.log
    
    td-agent.log
    debug.test: {"json":"message"}
    

参考

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2