ELK之使用metricbeat收集系统数据及其他程序并生成可视化图表

  将 Metricbeat 部署到您所有的 Linux、Windows 和 Mac 主机,并将它连接到 Elasticsearch 就大功告成啦:您可以获取系统级的 CPU 使用率、内存、文件系统、磁盘 IO 和网络 IO 统计数据,以及获得如同系统上 top 命令类似的各个进程的统计数据

  1,安装metricbeat

  官网下载rpm包安装

rpm -ivh /nas/nas/softs/elk/6.5.4/metricbeat-6.5.4-x86_64.rpm

  默认开启了system模块使用命令查看模块 

metricbeat modules list

Enabled:
system

Disabled:
aerospike
apache
ceph
couchbase
docker
dropwizard
elasticsearch
envoyproxy
etcd
golang
graphite
haproxy
http
jolokia
kafka
kibana
kubernetes
kvm
logstash
memcached
mongodb
munin
mysql
nginx
php_fpm
postgresql
prometheus
rabbitmq
redis
traefik
uwsgi
vsphere
windows
zookeeper

  PS:Enabled模块为启用模块 Disabled模块为未启用模块

  启用新模块命令,例如启用nginx模块

metricbeat modules enable nginx

  修改配置文件监控系统CPU,内存等信息

#包含其他模块的配置文件
metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
#开启dashboards
setup.dashboards.enabled: true
#输出至kibana
setup.kibana:
  host: "172.16.90.24:5601"
#输出至elssticsearch
output.elasticsearch:
  hosts: ["172.16.90.24:9200"]
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

  启动metricbeat

systemctl start metricbeat

  打开kibana页面查看自动生成了一些图表

  查看hostview

猜你喜欢

转载自www.cnblogs.com/minseo/p/10607540.html