首页 > 其他分享 >ELK

ELK

时间:2022-09-29 23:44:34浏览次数:44  
标签:ELK 9200 xpack enabled kibana elasticsearch password

services:
  app1:
    image: elasticsearch:8.4.2
    container_name: elasticsearch
    hostname: elasticsearch
    volumes:
      - ./elasticsearch/data:/usr/share/elasticsearch/data
      - ./elasticsearch/plugins:/usr/share/elasticsearch/plugins
      - ./elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
    ports:
      - 9200:9200
    environment:
      ELASTIC_PASSWORD: password
      ES_JAVA_OPTS: -Xms128m -Xmx1024m
    mem_limit: 1073741824
    ulimits:
      memlock:
        soft: -1
        hard: -1
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "curl -s https://localhost:9200 | grep -q 'missing authentication credentials'",
        ]
      interval: 10s
      timeout: 10s
      retries: 120

  app2:
    image: kibana:8.4.2
    container_name: kibana
    hostname: kibana
    command: "curl --user elastic:password -XPUT 'http://localhost:9200/_security/user/kibana_system/_password' -H 'Content-Type: application/json' -d'{ \"password\" : \"password\"}'"
    volumes:
      - ./kibana.yml:/usr/share/kibana/config/kibana.yml
    ports:
      - 5601:5601
    environment:
      ES_JAVA_OPTS: -Xms128m -Xmx1024m
    mem_limit: 1073741824
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "curl -s https://localhost:5601 | grep -q 'missing authentication credentials'",
        ]
      interval: 10s
      timeout: 10s
      retries: 120
    depends_on:
      - app1


mkdir -p elasticsearch/{config,data,plugins} && chmod 777 -R elasticsearch
echo vm.max_map_count=262144 >> /etc/sysctl.conf
sysctl -w vm.max_map_count=262144
curl --user elastic:password -XPUT 'http://localhost:9200/_security/user/kibana_system/_password' -H 'Content-Type: application/json' -d'{ "password" : "password"}'
docker exec -it elasticsearch elasticsearch-setup-passwords interactive
docker exec -it elasticsearch elasticsearch-reset-password -u kibana_system

# elasticsearch.yml
network.host: "0.0.0.0"
bootstrap.memory_lock: false
node.name: es01
cluster.name: es-cluster
discovery.type: single-node
xpack.security.enabled: true
xpack.security.http.ssl.enabled: false
xpack.security.transport.ssl.enabled: false
xpack.license.self_generated.type: basic
ingest.geoip.downloader.enabled: false
http.cors.enabled: true
http.cors.allow-origin: "*"
# kibana.yml
network.host: "0.0.0.0"
server.port: 5601
server.host: "kibana"
server.name: "kibana"
server.ssl.enabled: false
elasticsearch.hosts: ["http://elasticsearch:9200"]
elasticsearch.username: kibana_system
elasticsearch.password: password
monitoring.ui.container.elasticsearch.enabled: true
xpack.reporting.roles.enabled: false
xpack.reporting.encryptionKey: a_random_string
xpack.security.encryptionKey: something_at_least_32_characters
xpack.encryptedSavedObjects.encryptionKey: fhjskloppd678ehkdfdlliverpoolfcr
i18n.locale: "zh-CN"

标签:ELK,9200,xpack,enabled,kibana,elasticsearch,password
From: https://www.cnblogs.com/yzpopulation/p/16743515.html

相关文章

  • ELK收集交换机日志
    1、交换机配置#华三的命令举例info-centerloghost10.88.35.21port5003#elk的IP根据环境调整2、logstash配置2.1关闭服务和修改用户权限#关闭rsyslog服务,因为这个会......
  • 你的 Kibana 老崩么?有定时删除日志么?ELK 里 Kibana、ElasticSearch 还是 Logstash 的
    ELK系统中访问报错Kibana报错:{“statusCode“:500,“error"/InternalServerError","message":”[parent]Datatoolarge,datafor[<http_request>]wouldbe[99......
  • k8s部署elk+filebeat+kafka-kraft模式集群(三)filebeat部署
    k8s集群部署filebeatfilebeat需要采集每个节点的容器日志,所以我们选择daemonset的方式#catfilebeat-rbac.yamlapiVersion:v1kind:ServiceAccountmetadata:nam......
  • k8s部署elk+filebeat+kafka-kraft模式集群(二)kafka-zk集群
    kafka-zookeeper集群部署zk使用官方镜像,版本为3.5本文跳过rbac之类配置,与前文相同#catzk-statefulset.yamlapiVersion:v1kind:Servicemetadata:name:zk-svc......
  • k8s部署elk+filebeat+kafka-kraft模式集群(一)ES集群+kibana部署
    前言:这次是在部署后很久才想起来整理了下文档,如有遗漏见谅,期间也遇到过很多坑有些目前还没头绪希望有大佬让我学习下一、环境准备k8s-master013.127.10.209k8s-ma......
  • 【elk】es限制内存
    https://www.jianshu.com/p/aa450daecec0  找到ES的安装目录,然后找到config文件夹,里面都是相关的配置文件。  其中,jvm.options可以修改es运行时候的内......
  • springBoot整合elk
    使用docker-compose部署elk准备docker-compose.yml文件[root@192mall-elk]#pwd/root/docker/mall-elk[root@192mall-elk]#vimdocker-compose.yml内容如下:versi......
  • Docker 安装ELK
    ELK配置文件ES端口修改./es/config/elasticsearch.ymlKibana配置,ES地址,kibana账号密码./kibana/config/kibana.ymlLogstash配置修改,ES地址,ES账号密码./logstash......
  • 第九章 ELK常见报错及解决
    一、常见报错:shared小了1.报错#ES日志报错:ValidationFailed:1:thisactionwouldadd[2]totalshards,butthisclustercurrentlyhas[4999]/[5000]maximums......
  • ELK搭建自己的日志系统
    在开发过程中,日志会直接在控制台打印方便查看,而生产环境下应该保存为文件,以便以后查阅。随着项目规模越来越大,导致日志数据累计巨大,想要快速从文件中找到几乎是不可能......