MetricBeat(win/linux)部署 系统CPU内存等资源情况监控

目录

 

1.下载

2.linux系统监控

​3.启用模块

4.windows系统监控


1.下载

下载MetricBeat的linux和windows版本
https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-oss-7.2.1-linux-x86_64.tar.gz
https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-oss-7.2.1-windows-x86_64.zip

2.linux系统监控


tar xzvf metricbeat-*
cd metricbeat-*

修改下配置,setup命令连接的kibana地址改一下
vi metricbeat.yml 
setup.kibana:
  host: "192.168.81.145:5601"

安装Dashboard到kibana
./metricbeat setup -e
运行
./metricbeat -e

打开kibana,Discover界面能看到添加的metricbeat-*索引,里面有很多新添加的日志。
日志有很多字段,也有很多条,其中event.dataset代表事件数据集,如system.cpu就是cpu的性能数据。
Dashboard中的[Metricbeat System] Host overview ECS可以看到服务器性能情况,如下图,CPU、内存、进程等均有


3.启用模块

./metricbeat modules list
看默认enabled只有system一个,如果需要监听其他的服务,需要启动
./metricbeat modules enable elasticsearch
再次启动
./metricbeat -e

elasticsearch的数据中就存在了elasticsearch相关的信息

4.windows系统监控


解压zip包后修改metricbeat.yml配置文件,指向正确的es服务器:
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.81.145:9200"]

进入cmd命令行,执行metricbeat -e

此时,es中就会入进去windows这台机器的性能数据,可以在Dashboard的[Metricbeat System] Host overview ECS中,Filters切换到host.name:"机器名",查看系统监控

发布了426 篇原创文章 · 获赞 33 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/whq12789/article/details/103200734