[ELK] yum安装metricbeat

本文详细介绍了Metricbeat的安装步骤及配置方法,包括安装授权、配置yum源、使用yum安装、设置开机自启动等过程,并对Metricbeat的配置文件进行了具体说明,如输出到Elasticsearch的主机设置、Kibana的主机设置以及启用仪表板。

官方文档: https://www.elastic.co/guide/en/beats/metricbeat/current/setup-repositories.html

一、安装步骤:

1.安装授权 (Download and install the public signing key):

sudo rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch

2.配置yum源(若在安装elk时配置过,则无需重复添加)

[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

3.yum安装

 yum install metricbeat

4.配置开机自启动

chkconfig --add metricbeat

二、配置Metricbeat

vi /etc/metricbeat/metricbeat.yml

修改output.elasticsearch:

output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.33.160:9200"]

修改setup.kibana:

setup.kibana:
  # 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: "192.168.33.160:5601"

修改dashboard参数为true

#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here, or by using the `-setup` CLI flag or the `setup` command.
#setup.dashboards.enabled: false
setup.dashboards.enabled: true

启动metricbeat服务

systemctl start metricbeat

如下图所示

 

 

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值