ELK之metricbeat

环境:

window10

jdk11

metricbeat-7.16.3

目录

一、配置

metricbeat模块module

采集系统指标输出到es

采集es指标输出到es

输出到Logstash

二、运行


metricbeat为轻量型指标采集器,用于从系统和服务收集指标。Metricbeat 能够以一种轻量型的方式,输送各种系统和服务统计数据,从 CPU 到内存、 Redis、Nginx等等。

文档

支持、输出

一、配置

metricbeat模块module

metricbeat也有很多module,需要收集哪个module的信息,即启动该module即可,命令与Filebeat类似

## 查module列表
metricbeat modules list
## 启用module
metricbeat modules enable 模块名
## 禁用module
metricbeat modules disable 模块名

采集系统指标输出到es

启用system模块

metricbeat modules enable system

修改metricbeat.yml

metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
#  #_source.enabled: false

output.elasticsearch:
  hosts: ["http://localhost:9200"]
logging.level: debug

  # Kibana 

setup.kibana:

 http://localhost:5601/path
  host: "192.168.1.90:5601"

采集es指标输出到es

启用elasticsearch模块

metricbeat modules enable elasticsearch

修改metricbeat.yml

metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression

output.elasticsearch:
  hosts: ["http://localhost:9200"]
logging.level: debug

  # Kibana 

setup.kibana:

 http://localhost:5601/path
  host: "192.168.1.90:5601"

输出到Logstash

注释Elasticsearch Output,取消注释Logstash Output

output.logstash:
  hosts: ["localhost:5044"]

二、运行

cmd运行

metricbeat -e 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值