日志收集系统笔记

时间:2014-11-14 11:58:00 +0800

这货号称每天日志收集量可以达到5TB

而且支持集群和分布式

感谢东升发现的这么个牛逼的东西

恩。我先感谢国家

首先使用的是

fluentd

他既是客户端又是服务端

这是官方文档http://docs.fluentd.org/

安装方法,推荐yum安装

curl -L http://toolbelt.treasuredata.com/sh/install-redhat-td-agent2.sh | sh

sh内容

echo "This script requires superuser access to install rpm packages."

echo "You will be prompted for your password by sudo."

clear any previous sudo permission

sudo -k

run inside sudo

sudo sh <<SCRIPT

add GPG key

rpm --import http://packages.treasuredata.com/GPG-KEY-td-agent

add treasure data repository to yum

cat >/etc/yum.repos.d/td.repo <<‘EOF’

[treasuredata]

name=TreasureData

baseurl=http://packages.treasuredata.com/2/redhat/$releasever/$basearch

gpgcheck=1

gpgkey=http://packages.treasuredata.com/GPG-KEY-td-agent

EOF

update your sources

yes n | yum update

 

install the toolbelt

yes | yum install -y td-agent

额。就不用我多说了。yum安装就减少了很多依赖问题

安装环境是centos

启动方式

$ /etc/init.d/td-agent start
Starting td-agent: [  OK  ]
$ /etc/init.d/td-agent status
td-agent (pid  21678) is running...

启动和重启还有停止神马的

$ /etc/init.d/td-agent start
$ /etc/init.d/td-agent stop
$ /etc/init.d/td-agent restart
$ /etc/init.d/td-agent status

顺便说一下配置文件在

/etc/td-agent/td-agent.conf

然后准备使用mongoDB搞一个日志存储。

期待我下一篇文章吧骚年

×

Subscribe

The latest tutorials sent straight to your inbox.