一步步建立 ELK log分析平台 --- filebeat 6.5.4 安装

1. 下载filebeat

ELK 体系里面 beats是log收集的模块,相当于garafana监控系统里面的各种agent,beats里面分为多种beat, 分为filebeat, 

Packetbeat 和Metricbeat。  这次我们只是log分析,安装filebeat就可以了

# wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-6.5.4-linux-x86_64.tar.gz

# tar -zxvf filebeat-6.5.4-linux-x86_64.tar.gz 

2. 修改filebeat.yml 文件

#vi filebeat.yml
filebeat.inputs:

# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.

- type: log
  enabled: true
  paths:
     - /usr/local/a2p/log/*.log
  encoding: utf-8
  document_type: sms_system_log
  multiline.pattern: ^20
  multiline.negate: true
  multiline.match: after

- type: log
  enabled: true
  paths:
     - /usr/local/a2p/log/*.cdr.*
  encoding: utf-8
  document_type: sms_cdr
  multiline.pattern: ^20
  multiline.negate: true
  multiline.match: after

name: "HK_SMS_184"

#output.elasticsearch:   #必须注释了
  # Array of hosts to connect to.
#  hosts: ["localhost:9200"]  # 必须注释了

output.logstash:
  # The Logstash hosts
  hosts: ["172.31.216.34:5044"]

3. 启动filebeat

# more start.sh 
#!/usr/bin/bash

basepath=$(cd `dirname $0`; pwd)
nohup ./filebeat -c filebeat.yml -path.logs $basepath/logs &

到此为止,整个日志系统的监控平台安装完毕,后期将会慢慢研究怎么用的更好。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值