Discuz! Board
标题:
安装logstash
[打印本页]
作者:
wushiwei
时间:
2016-4-6 11:51
标题:
安装logstash
1. yum源 cd /etc/yum.repos.d/
wget http:://10.10.114.116/whaley_tools/rhel.repo
yum clean all
yum makecache
2. 安装配置logstash
yum install logstash
cd /etc/logstash/conf.d/
模板
wget http:://10.10.114.116/whaley_tools/shipper.conf
3. 配置nginx json log格式
log_format json '{"@timestamp":"$time_iso8601",'
'"host":"$server_addr",'
'"clientip":"$remote_addr",'
'"size"
body_bytes_sent,'
'"request":"$request",'
'"responsetime"
request_time,'
'"upstreamtime":"$upstream_response_time",'
'"upstreamhost":"$upstream_addr",'
'"http_host":"$host",'
'"url":"$uri",'
'"xff":"$http_x_forwarded_for",'
'"referer":"$http_referer",'
'"agent":"$http_user_agent",'
'"status":"$status"}';
欢迎光临 Discuz! Board (http://123.59.83.120:8080/)
Powered by Discuz! X3.2