ELK7.17.4安装配置

说明

ELK之前有很多笔记已经记录,单之前多是版本6的,本文不详细记录安装过程只记录一些配置信息

环境查看

明细 版本
CentOS 7.4
elasticsearch 7.17.4
kibana 7.17.4
metricbeat 7.17.4

下载

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.17.4-x86_64.rpm
wget https://artifacts.elastic.co/downloads/kibana/kibana-7.17.4-x86_64.rpm
wget https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-7.17.4-x86_64.rpm

更多版本和平台请登录以下网址下载
ELK下载

安装

rpm -ivh elasticsearch-7.17.4-x86_64.rpm  kibana-7.17.4-x86_64.rpm  metricbeat-7.17.4-x86_64.rpm

配置文件

elasticsearch

[root@192 rpm]# sed '/#/d' /etc/elasticsearch/elasticsearch.yml
cluster.name: myes
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.1.101
http.port: 9200
discovery.seed_hosts: ["192.168.1.101"]
cluster.initial_master_nodes: ["192.168.1.101"]

注意:7.17.4版本大部分配置和6版本一致,不一样的地方需要配置以下两项

discovery.seed_hosts: ["192.168.1.101"]
cluster.initial_master_nodes: ["192.168.1.101"]

kibana

[root@192 rpm]# sed '/#/d' /etc/kibana/kibana.yml |sed '/^$/d'
server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://192.168.1.101:9200"]
kibana.index: ".kibana"

metricbeat

[root@192 rpm]# sed '/#/d' /etc/metricbeat/metricbeat.yml |sed '/^$/d'
metricbeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
setup.dashboards.enabled: true
setup.kibana:
  host: "192.168.1.101:5601"
output.elasticsearch:
  hosts: ["192.168.1.101:9200"]
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~
  - add_docker_metadata: ~
  - add_kubernetes_metadata: ~

启动

使用systemctl启动

使用metricbeat

metricbeat setup
metricbeat -e

页面查看

image
image

在arm平台则直接下载arm版本metricbeat安装配置即可,配置文件和x86平台是一样的

filebeat

安装
配置和metricbeat一样修改kibana和elasticsearch地址即可

使用filebeat

filebeat setup
filebeat -e

把默认模板去掉尾部保持默认配置即可

posted @ 2022-06-12 11:03  minseo  阅读(185)  评论(0编辑  收藏  举报