ELK学习二:filebeat收集

简介: ELK学习二:filebeat收集

下载安装地址:

https://www.elastic.co/cn/downloads/beats/filebeat

配置filebeat

filebeat配置分为2个部分,input和output:

input:

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
  # Change to true to enable this input configuration.
  enabled: true
  # Paths that should be crawled and fetched. Glob based paths.
  paths:
    - /var/log/*.log
    - /www/wwwlogs/**

output:

output.kafka:
  hosts: \["127.0.0.1:9092"\]
  # 在这里通过引用fields来指定目标topic
  topic: 'test-input'
  version: 0.11.0.0
  compression: gzip
  max\_message\_bytes: 1000000

注意,开启kafka output需要在modules.d/中将kafka.yml.disable改名为 kafka.yml

启动filebeat

./filebeat -e -c filebeat.yml -d "publish"    # 直接启动查看启动日志
nohup ./filebeat -e -c filebeat.yml >/dev/null 2>&1 &  # 后台方式启动

目录
相关文章
|
11月前
|
存储 NoSQL Redis
容器部署日志分析平台ELK7.10.1(Elasisearch+Filebeat+Redis+Logstash+Kibana)
容器部署日志分析平台ELK7.10.1(Elasisearch+Filebeat+Redis+Logstash+Kibana)
505 0
|
1月前
|
存储 应用服务中间件 nginx
部署ELK+filebeat收集nginx日志
部署ELK+filebeat收集nginx日志
部署ELK+filebeat收集nginx日志
|
1月前
|
消息中间件 Kafka 应用服务中间件
ELK7.6+Filebeat集群部署
ELK7.6+Filebeat集群部署
|
1月前
|
NoSQL 关系型数据库 MySQL
一文吃透企业级elk技术栈:6. filebeat安装配置
一文吃透企业级elk技术栈:6. filebeat安装配置
|
4月前
|
消息中间件 Kafka Apache
Kafka 架构深入介绍 及搭建Filebeat+Kafka+ELK
Kafka 架构深入介绍 及搭建Filebeat+Kafka+ELK
|
4月前
|
监控 NoSQL Redis
ELK7.x日志系统搭建 3. 采用轻量级日志收集Filebeat
ELK7.x日志系统搭建 3. 采用轻量级日志收集Filebeat
144 0
|
监控 NoSQL Redis
ELK7.x日志系统搭建 3. 采用轻量级日志收集Filebeat
ELK7.x日志系统搭建 3. 采用轻量级日志收集Filebeat
136 0
|
JSON 监控 搜索推荐
ELK服务搭建学习
ELK服务搭建学习
140 0
|
消息中间件 数据可视化 JavaScript
日志可视化方案:ELK+filebeat
日志可视化方案:ELK+filebeat
|
NoSQL Redis
手把手教你搭建ELK-新手必看-第六章:搭建filebeat
手把手教你搭建ELK-新手必看-第六章:搭建filebeat
177 0
手把手教你搭建ELK-新手必看-第六章:搭建filebeat