栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

ELK之metricbeat

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 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/721858.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号