ELK集群设置密码

一、软件安装清单

  • elasticsearch7.17.22
  • logstash7.17.22
  • kibana:7.17.22
  • filebeat7.17.22
  • elasticsearch-head:5

二、配置

  1. 生成证书

进入elasticsearch容器

bash 复制代码
bin/elasticsearch-certutil cert -out /usr/share/elasticsearch/config/elastic-certificates.p12 -pass
  1. 将证书拷贝至其他容器后重启集群
  2. 设置密码

进入容器设置密码

bash 复制代码
bin/elasticsearch-setup-passwords interactive
  1. 设置elasticsearch

elasticsearch.yml

bash 复制代码
# 安全认证
xpack.security.enabled: true
xpack.license.self_generated.type: basic
xpack.security.transport.ssl.enabled: true
http.cors.allow-headers: "Authorization"

xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
  1. 设置logstash

logstash.yml

bash 复制代码
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: elastic
xpack.monitoring.elasticsearch.password: xxxxxx

logstash-filebeat.conf

bash 复制代码
output {
    # 选择elasticsearch
    elasticsearch {
        hosts => ["http://es-master:9200"]
        user => "elastic"
        password => "xxxxxx"
        index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
    }
}
  1. 设置kibana

kibana.yml

bash 复制代码
elasticsearch.username: "elastic"
elasticsearch.password: "xxxxxx"
xpack.security.enabled: true
  1. 验证

访问地址 http://kibana服务IP:5601

参考

https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-basic-setup.html

相关推荐
陈桴浮海18 分钟前
【Linux&Ansible】学习笔记合集三
linux·运维·云原生·ansible
小Pawn爷19 分钟前
1.Docker基础
运维·docker·容器
chinesegf21 分钟前
清理docker残留镜像images
运维·docker·容器
江湖有缘25 分钟前
基于华为openEuler系统部署Gitblit服务器
运维·服务器·华为
EnglishJun35 分钟前
Linux系统编程(二)---学习Linux系统函数
linux·运维·学习
小Pawn爷39 分钟前
2.Docker的存储
运维·docker·容器
CaracalTiger40 分钟前
OpenClaw-VSCode:在 VS Code 中通过 WebSocket 远程管理 OpenClaw 网关的完整方案
运维·ide·人工智能·vscode·websocket·开源·编辑器
qq_54702617940 分钟前
LangChain 1.0 核心概念
运维·服务器·langchain
生而为虫1 小时前
[Windows] 【浏览器自动化精灵V1.0】用Excel表格控制浏览器的自动化
运维·自动化
Fcy6481 小时前
Linux下 进程(二)(进程状态、僵尸进程和孤儿进程)
linux·运维·服务器·僵尸进程·孤儿进程·进程状态