美文网首页
td-agent 升级

td-agent 升级

作者: HelloWorld_26 | 来源:发表于2018-06-22 11:39 被阅读0次

curl -L https://toolbelt.treasuredata.com/sh/install-amazon1-td-agent3.sh | sh

/etc/td-agent/

[root@ip td-agent]# cat td-agent.conf

@include /etc/td-agent/conf.d/*.conf

/etc/td-agent/conf.d

[root@ip conf.d]# cat td-gamex.conf

<source>

@type forward

port 24224

</source>

##########################################################################################

<source>

@type tail

format json

time_key time

time_format %N

pos_file /var/log/td-agent/a.log.pos

path /opt/supervisor/log/log*.%d.%m.%Y.log

tag log.106

</source>

##########################################################################################

<match debug.**>

@type stdout

</match>

##########################################################################################

<match log.**>

@type forward # forward模式,转发给其他服务器处理

send_timeout 60s

recover_wait 10s

transport

phi_threshold 16

hard_timeout 60s

<server>

 name log.shard

 host 【IP】

 port 24224

 weight 1

</server>

<secondary>

 @type file

 path /var/log/td-agent/log-forward-failed

</secondary>

</match>

##########################################################################################

例如添加一个 client log

[root@ip conf.d]# cat client.conf

<source>

@type tail

format json

time_key time

time_format %N

pos_file /var/log/td-agent/client_150.log.pos

path /opt/supervisor/log/client*.%d.%m.%Y.log

tag client.150

</source>

##########################################################################################

<match debug.**>

@type stdout

</match>

##########################################################################################

<match client_log.**>

@type forward # forward模式,转发给其他服务器处理

send_timeout 60s

recover_wait 10s

transport

phi_threshold 16

hard_timeout 60s

<server>

 name client_log

 host 【IP】

 port 24224

 weight 1

</server>

<secondary>

 @type file

 path /var/log/td-agent/logics-forward-failed

</secondary>

</match>

##########################################################################################

中转机器上添加配置

[root@ip conf.d]# cat td-client.conf

<match debug.**>

@type stdout

</match>

##################################################################################

<match client_log.**>

@type copy

<store>

@type elasticsearch_dynamic

host  【IP】

port 9200

request_timeout 15s #defaults to 5s

reload_connections false

reload_on_failure true # defaults to false

logstash_format true

logstash_prefix client_logiclog

logstash_dateformat %Y.%m.%d

time_key time

<buffer>

  @type file

  path /var/log/td-agent/buffer/td-client_log-buffer

  chunk_limit_size 512MB #Default: 8MB (memory) / 256MB (file)

  total_limit_size 32GB #Default: 512MB (memory) / 64GB (file)

  chunk_full_threshold 0.9 #output plugin will flush the chunk when actual size reaches chunk_limit_size * 
  chunk_full_threshold

  compress text #The option to specify compression of each chunks, during events are buffered

  flush_mode default

  flush_interval 15s #Default: 60s

  flush_thread_count 1 #Default: 1 The number of threads of output plugins, which is used to write chunks in parallel

  delayed_commit_timeout 60 #The timeout seconds until output plugin decides that async write operation fails

  overflow_action throw_exception

  retry_timeout 10m

</buffer>

</store>

</match>

相关文章

  • td-agent 升级

    curl -L https://toolbelt.treasuredata.com/sh/install-amaz...

  • fluentd out_forward翻译

    td-agent server配置官网:http://docs.fluentd.org/articles/out_...

  • 日报

    2020.6.221.撤销 opay PaaS 自隔离代码2.邮件通知综合环境人员安装td-agent 6.231...

  • fluentd(td-agent)文档

    简介 Fluentd(td-agent)是一个日志采集器,提供了丰富的插件来适配不同的数据源、输出目的地等Flue...

  • Fluentd

    Fluentd是由Ruby和C编写的,需要ruby进行,然而安装td-agent是fluentd 的易安装版本,不...

  • [转]Fluentd配置使用

    如果你安装Fluentd运用的是rpm或是deb 的安装包,这个配置文件在/etc/td-agent/td-age...

  • 用Fluentd实现收集日志到HDFS(上和下)

    当td-agent与namenode在一台物理机上时可以正常运行,当不在一台物理机上时,报“Connection ...

  • Fluentd 和 td-agent 的区别

    Frequently Asked Questions | Fluentd[https://www.fluentd....

  • Linux下td-agent(fluentd)的安装和配置

    1.Fluentd安装之前的准备工作 参考的官网链接 1.在节点上设置NTP守护程序,以获得准确的当前时间戳。 安...

  • 哦耶升级了!

    哦耶升级了! 哦耶升级了! 哦耶升级了! 哦耶升级了! 哦耶升级了! 哦耶升级了! 哦耶升级了! 哦耶升级了! 哦...

网友评论

      本文标题:td-agent 升级

      本文链接:https://www.haomeiwen.com/subject/cpxkyftx.html