在Metricbeat 6.x中进行服务器监控

安装 Metricbeat

rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
cat << EOF > /etc/yum.repos.d/elastic.repo
[Elastic-6.x]
name=Elastic repository for 6.x packages
baseurl=https://artifacts.elastic.co/packages/6.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

yum install -y metricbeat

Metricbeat的初始配置

vi /etc/metricbeat/metricbeat.yml

# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
#host: "localhost:5601"
host: "{{Kibana Host}}:{{Port}}"

・・・・・・

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  #hosts: ["localhost:9200"]
  hosts: ["{{Elasticsearch Host}}:{{Port}}"]
systemctl enable metricbeat.service
systemctl start metricbeat.service

在Kibana上进行确认

kibana_dashboard.png

如果在仪表板上没有[Metricbeat System],请在安装了Metricbeat的服务器上执行以下命令。

metricbeat setup --dashboards
kibana_dashboard_002.png
kibana_dashboard_003.png
广告
将在 10 秒后关闭
bannerAds