filebeat环境搭建

Filebeat的input

通过paths属性指定要监控的数据

Filebeat的output

1、Elasticsearch Output(Filebeat收集到数据,输出到es里。默认的配置文件里是有的,也可以去官网上去找)

2、Logstash Output(Filebeat收集到数据,输出到logstash里。默认的配置文件里是有的,也可以得去官网上去找)

3、Redis Output(Filebeat收集到数据,输出到redis里。默认的配置文件里是没有的,得去官网上去找)

4、File Output(Filebeat收集到数据,输出到file里。默认的配置文件里是有的,也可以去官网上去找)

5、Console Output(Filebeat收集到数据,输出到console里。默认的配置文件里是有的,也可以去官网上去找)

6、kafka Output(Filebeat收集到数据,输出到kafka里。默认的配置文件里是有的,也可以去官网上去找)



手把手教你看官网(如何查找并配置为自己的,以kafka Output为例)

第一步: https://www.elastic.co/

第二步:https://www.elastic.co/learn

sfs

第三步: https://www.elastic.co/guide/index.html

第四步: https://www.elastic.co/guide/en/beats/filebeat/index.html

第五步:https://www.elastic.co/guide/en/beats/filebeat/6.1/index.html

第六步:配置output

output.kafka:

  enabled: true

  hosts: ["x.x.x.x:9092","x.x.x.x:9092","x.x.x.x:9092"]

  topic: mytest-topic

以上是官网提供例子


以下是我的情况:

1,第一步:下载filebeat(版本filebeat-6.1.2-linux-x86_64)

2,第二步:配置filebeat.yml

###################### Filebeat Configuration Example #########################

filebeat.prospectors:

- type: log

  enabled: true

  paths:

    - /httx/logs/myout_test.log

filebeat.config.modules:

  path: ${path.config}/modules.d/*.yml

  reload.enabled: false

setup.template.settings:

  index.number_of_shards: 3

output.kafka:

  enabled: true

  hosts: ["x.x.x.x:9092","x.x.x.x:9092","x.x.x.x:9092"]

  topic: mytest-topic

  required_acks: 1

第七步:启动filebeat

./filebeat -c filebeat_es.yml

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 本人陆陆续续接触了ELK的1.4,2.0,2.4,5.0,5.2版本,可以说前面使用当中一直没有太多感触,最近使用...
    三杯水Plus阅读 4,120评论 0 12
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,981评论 19 139
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,449评论 0 10
  • 这些天,王宝强离婚的新闻,持续地发酵,引发了网络上一轮又一轮的声讨。 作为一个普通人,明星的世界毕...
    清水飙阅读 308评论 0 0
  • 今天 大雨 摄氏三十一度 看水淹没 没有色彩的城市 只有雨的声音 端一把椅子 站着或坐下 阴沉的云克制哭腔 衰败...
    Esteban_BeiZhi阅读 327评论 0 2