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

相关推荐
写代码的橘子n19 分钟前
IPV6复习(基础入手版)
运维·服务器·网络
ICT技术最前线23 分钟前
H3C双WAN口策略路由配置技术教程
运维·网络·h3c·策略路由
一分半心动30 分钟前
windows docker desktop 安装VibeVoice
运维·docker·容器
向日葵.1 小时前
中间件交接文档
linux·运维·服务器
LucidX1 小时前
Docker核心操作实战
运维·docker·容器
隔壁阿布都1 小时前
Docker Compose中的网络管理
运维·docker·容器
云和数据.ChenGuang1 小时前
运维工程师技术教程之Pull Requests(PR)
运维·分布式·git·数据库运维工程师·运维教程
小快说网安1 小时前
抗 DDoS 防护在等保测评中的权重提升:云服务器如何通过防护能力加分?
运维·服务器·ddos·等保测评
翼龙云_cloud1 小时前
阿里云渠道商:如何快速解决更换阿里云GPU公网IP后出现的网络故障?
运维·tcp/ip·阿里云·云计算
陌路202 小时前
TCP连接如何确保其可靠性
运维·服务器