-
metric 安装
下载metricbeat-5.6.4-linux-x86_64.tar.gz,上传到服务器解压。
修改metricbeat.yml 文件,
主要是metricsets 选择自己要采集的选项,然后是es地址
#------------------------------- System Module -------------------------------
- module: system
metricsets:
# CPU stats
- cpu
# System Load stats
- load
# Per CPU core stats
#- core
# IO stats
- diskio
# Per filesystem stats
#- filesystem
# File system summary stats
#- fsstat
# Memory stats
- memory
# Network stats
- network
# Per process stats
- process
# Sockets (linux only)
#- socket
enabled: true
period: 10s
processes: ['.*']
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["10.0.0.0:9200"]
修改 metricbeat.template.json 文件(该步骤可选做)
最下面几行添加分片数和副本数设置
"settings": {
"index.mapping.total_fields.limit": 10000,
"index.refresh_interval": "15s",
"index.number_of_shards": "3",
"index.number_of_replicas": "0"
},
运行metricbeat
nohup ./metricbeat -c metricbeat.yml &
导入dashboard
./scripts/import_dashboards -es http://10.0.0.0:9200
去kibana创建 index pattern