当前位置:   article > 正文

Elasticsearch 7.13.2 多节点集群(含配置xpack及创建设置证书和私钥)安装部署指南_es集群配置xpack

es集群配置xpack

一、兼容性检查

1.1 操作系统兼容性

elasticsearch不同版本对操作系统有兼容性要求,可参照如下官方链接查看ES和操作系统兼容需求列表。

产品和操作系统: https://www.elastic.co/cn/support/matrix#matrix_os

1.2 JVM兼容性

elasticsearch不同版本对JVM有兼容性要求,可参照如下官方链接查看ES和JVM兼容需求列表。

产品和JVM: https://www.elastic.co/cn/support/matrix#matrix_jvm

二、环境准备

2.1 环境列表

服务器IP主机名称角色端口号操作系统版本
10.110.7.39xsky-node1master9200、9201CentOS Linux release 7.9.2009 (Core)
10.110.7.40xsky-node2master9200、9201CentOS Linux release 7.9.2009 (Core)
10.110.7.41xsky-node3master9200、9201CentOS Linux release 7.9.2009 (Core)

2.2 关闭防火墙

  1. -- root 用户执行,所有节点
  2. systemctl stop firewalld && systemctl disable firewalld
  3. systemctl status firewalld

2.3 设置内核参数

  1. -- root 用户执行,所有节点
  2. sed -e '/^vm.max_map_count/d' \
  3. -i.bak \
  4. /etc/sysctl.conf; \
  5. sed -e '$a vm.max_map_count=655360' \
  6. -i.bak \
  7. /etc/sysctl.conf; \
  8. sed -e '/^* soft nofile/d' \
  9. -e '/^* hard nofile/d' \
  10. -e '/^elasticsearch soft nofile/d' \
  11. -e '/^elasticsearch hard nofile/d' \
  12. -e '/^* soft memlock/d' \
  13. -e '/^* hard memlock/d' \
  14. -e '/^elasticsearch soft memlock/d' \
  15. -e '/^elasticsearch hard memlock/d' \
  16. -i.bak \
  17. /etc/security/limits.conf; \
  18. sed -e '$a * soft nofile 655350' \
  19. -e '$a * hard nofile 655350' \
  20. -e '$a elasticsearch soft nofile 655350' \
  21. -e '$a elasticsearch hard nofile 655350' \
  22. -e '$a * soft memlock unlimited' \
  23. -e '$a * hard memlock unlimited' \
  24. -e '$a elasticsearch soft memlock unlimited' \
  25. -e '$a elasticsearch hard memlock unlimited' \
  26. -i.bak \
  27. /etc/security/limits.conf; \
  28. sysctl -p

2.4 关闭交换分区

  1. -- root 用户执行,所有节点
  2. swapoff -a;
  3. # 注释/etc/fstab文件swap信息
  4. # /dev/mapper/centos-swap swap swap defaults 0 0

2.5 安装JDK

  1. # root 用户执行,所有节点
  2. wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
  3. tar -zxvf openjdk-11+28_linux-x64_bin.tar.gz
  4. chown -R root:root /usr/java
  5. # 编辑/etc/profile文件,文件末尾添加如下内容
  6. export JAVA_HOME=/usr/java/jdk-11
  7. export ES_JAVA_HOME=/usr/java/jdk-11
  8. export PATH=$ES_JAVA_HOME/bin:$PATH
  9. export PATH=$JAVA_HOME/bin:$PATH
  10. # 执行source /etc/profile使其生效

2.6 创建用户

  1. # elasticsearch 7启动需要使用普通用户
  2. # 使用root用户创建esuser用户
  3. groupadd esuser
  4. useradd -g esuser esuser

2.7 创建目录

  1. # 使用root用户,所有节点都操作
  2. # 创建存放数据及日志目录
  3. # 生产环境建议单独挂载目录
  4. mkdir -p /path/to
  5. chown -R esuser:esuser /path

三、安装部署elasticsearch

3.1 下载二进制安装包

  1. # esuser用户
  2. mkdir /home/esuser/deploy
  3. wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.13.2-linux-x86_64.tar.gz /home/soft
  4. tar -zxvf /home/soft/elasticsearch-7.13.2-linux-x86_64.tar.gz -C /home/esuser/deploy
  5. chown -R esuser:esuser /home/esuser/deploy
  6. su - esuser
  7. mv /home/esuser/deploy/elasticsearch-7.13.2 /home/esuser/deploy/elasticsearch-7.13.2-9300
  8. cp -a /home/esuser/deploy/elasticsearch-7.13.2-9300 /home/esuser/deploy/elasticsearch-7.13.2-9301

3.2 配置elasticsearch.yml

分别在每个节点配置9300和9301两个目录elasticsearch.yml文件,内容分别如下:

9300目录elasticsearch.yml

  1. -- esuser用户,所有节点
  2. -- 注意每个节点需该对应配置文件信息
  3. cd elasticsearch-7.13.2-9300/config
  4. cat elasticsearch.yml 内容如下(过滤#)
  5. # ======================== Elasticsearch Configuration =========================
  6. cluster.name: es-cluster
  7. # ------------------------------------ Node ------------------------------------
  8. node.name: node-7.39-9300 # node.name要根据对应节点进行修改,不能相同
  9. node.attr.rack: r1
  10. node.attr.type: hot
  11. node.master: true
  12. node.data: true
  13. node.ingest: false
  14. node.ml: false
  15. cluster.remote.connect: false
  16. thread_pool.write.queue_size: 1000
  17. # ----------------------------------- Paths ------------------------------------
  18. path.data: /path/to/data-9300
  19. path.logs: /path/to/logs-9300
  20. # ----------------------------------- Memory -----------------------------------
  21. bootstrap.memory_lock: true
  22. bootstrap.system_call_filter: false
  23. # ---------------------------------- Network -----------------------------------
  24. network.host: 10.110.7.39 # network.host要和物理服务器IP对应,不能相同
  25. http.port: 9200
  26. transport.tcp.port: 9300
  27. # --------------------------------- Discovery ----------------------------------
  28. cluster.initial_master_nodes: ["node-7.39-9300", "node-7.39-9301", "node-7.40-9300", "node-7.40-9301", "node-7.41-9300", "node-7.41-9301"]
  29. discovery.zen.ping.unicast.hosts: ["10.110.7.39:9300","10.110.7.39:9301", "10.110.7.40:9300","10.110.7.40:9301", "10.110.7.41:9300","10.110.7.41:9301"]
  30. discovery.zen.minimum_master_nodes: 3
  31. discovery.zen.fd.ping_timeout: 60s
  32. discovery.zen.fd.ping_retries: 3
  33. discovery.zen.fd.ping_interval: 10s
  34. # ---------------------------------- Gateway -----------------------------------
  35. # ---------------------------------- Various -----------------------------------
  36. xpack.security.enabled: true
  37. xpack.security.transport.ssl.enabled: true
  38. xpack.security.transport.ssl.verification_mode: certificate
  39. xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
  40. xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
  41. xpack.security.http.ssl.supported_protocols: [ "TLSv1.3", "TLSv1.2", "TLSv1.1", "TLSv1" ]
  42. http.cors.enabled: true
  43. http.cors.allow-origin: "*"
  44. http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
  45. http.max_content_length: 1000mb
  46. action.destructive_requires_name: true
  47. xpack.security.audit.enabled: true
  48. xpack.security.audit.logfile.events.exclude: ["access_granted"]
  49. xpack:
  50. security:
  51. authc:
  52. realms:
  53. native:
  54. native11:
  55. order: 0
  56. ldap.ldap1:
  57. order: 1
  58. url: ["ldap://authldap.vemic.com:389","ldap://ldap-proxy.vemic.com:389"]
  59. cache:
  60. ttl: 60m
  61. user_dn_templates:
  62. - "cn={0},cn=users,dc=xxx,dc=com"
  63. group_search:
  64. base_dn: "cn=users,dc=focuschina,dc=com"
  65. unmapped_groups_as_roles: false
  66. xpack.notification.email:
  67. default_account: 110
  68. account:
  69. 110:
  70. profile: standard
  71. smtp:
  72. auth: true
  73. host: 192.168.16.190
  74. user: 110@xxx.com

9301目录elasticsearch.yml

  1. -- 注意每个节点需该对应配置文件信息
  2. cd elasticsearch-7.13.2-9301/config
  3. # ======================== Elasticsearch Configuration =========================
  4. cluster.name: es-cluster
  5. # ------------------------------------ Node ------------------------------------
  6. node.name: node-7.39-9301 # node.name要根据节点进行对应修改
  7. node.attr.rack: r1
  8. node.attr.type: hot
  9. node.master: true
  10. node.data: true
  11. node.ingest: false
  12. node.ml: false
  13. cluster.remote.connect: false
  14. thread_pool.write.queue_size: 1000
  15. # ----------------------------------- Paths ------------------------------------
  16. path.data: /path/to/data-9300
  17. path.logs: /path/to/logs-9300
  18. # ----------------------------------- Memory -----------------------------------
  19. bootstrap.memory_lock: true
  20. bootstrap.system_call_filter: false
  21. # ---------------------------------- Network -----------------------------------
  22. network.host: 10.110.7.39 # network.host要和物理服务器IP对应
  23. http.port: 9201
  24. transport.tcp.port: 9301
  25. # --------------------------------- Discovery ----------------------------------
  26. cluster.initial_master_nodes: ["node-7.39-9300", "node-7.39-9301", "node-7.40-9300", "node-7.40-9301", "node-7.41-9300", "node-7.41-9301"]
  27. discovery.zen.ping.unicast.hosts: ["10.110.7.39:9300","10.110.7.39:9301", "10.110.7.40:9300","10.110.7.40:9301", "10.110.7.41:9300","10.110.7.41:9301"]
  28. discovery.zen.minimum_master_nodes: 3
  29. discovery.zen.fd.ping_timeout: 60s
  30. discovery.zen.fd.ping_retries: 3
  31. discovery.zen.fd.ping_interval: 10s
  32. # ---------------------------------- Gateway -----------------------------------
  33. # ---------------------------------- Various -----------------------------------
  34. xpack.security.enabled: true
  35. xpack.security.transport.ssl.enabled: true
  36. xpack.security.transport.ssl.verification_mode: certificate
  37. xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
  38. xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
  39. xpack.security.http.ssl.supported_protocols: [ "TLSv1.3", "TLSv1.2", "TLSv1.1", "TLSv1" ]
  40. http.cors.enabled: true
  41. http.cors.allow-origin: "*"
  42. http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type
  43. http.max_content_length: 1000mb
  44. action.destructive_requires_name: true
  45. xpack.security.audit.enabled: true
  46. xpack.security.audit.logfile.events.exclude: ["access_granted"]
  47. xpack:
  48. security:
  49. authc:
  50. realms:
  51. native:
  52. native11:
  53. order: 0
  54. ldap.ldap1:
  55. order: 1
  56. url: ["ldap://authldap.vemic.com:389","ldap://ldap-proxy.vemic.com:389"]
  57. cache:
  58. ttl: 60m
  59. user_dn_templates:
  60. - "cn={0},cn=users,dc=xxx,dc=com"
  61. group_search:
  62. base_dn: "cn=users,dc=focuschina,dc=com"
  63. unmapped_groups_as_roles: false
  64. xpack.notification.email:
  65. default_account: 110
  66. account:
  67. 110:
  68. profile: standard
  69. smtp:
  70. auth: true
  71. host: 192.168.16.190
  72. user: 110@xxx.com

3.2 配置jvm.options

分别配置9300和9301两个目录jvm.options文件,内容如下:

  1. -Xms8g
  2. -Xmx8g
  3. -XX:+UseConcMarkSweepGC
  4. -XX:CMSInitiatingOccupancyFraction=75
  5. -XX:+UseCMSInitiatingOccupancyOnly
  6. -Des.networkaddress.cache.ttl=60
  7. -Des.networkaddress.cache.negative.ttl=10
  8. -XX:+AlwaysPreTouch
  9. -Xss1m
  10. -Djava.awt.headless=true
  11. -Dfile.encoding=UTF-8
  12. -Djna.nosys=true
  13. -XX:-OmitStackTraceInFastThrow
  14. -Dio.netty.noUnsafe=true
  15. -Dio.netty.noKeySetOptimization=true
  16. -Dio.netty.recycler.maxCapacityPerThread=0
  17. -Dlog4j.shutdownHookEnabled=false
  18. -Dlog4j2.disable.jmx=true
  19. -Djava.io.tmpdir=${ES_TMPDIR}
  20. -XX:+HeapDumpOnOutOfMemoryError
  21. -XX:HeapDumpPath=data
  22. -XX:ErrorFile=logs/hs_err_pid%p.log
  23. 8:-XX:+PrintGCDetails
  24. 8:-XX:+PrintGCDateStamps
  25. 8:-XX:+PrintTenuringDistribution
  26. 8:-XX:+PrintGCApplicationStoppedTime
  27. 8:-Xloggc:logs/gc.log
  28. 8:-XX:+UseGCLogFileRotation
  29. 8:-XX:NumberOfGCLogFiles=32
  30. 8:-XX:GCLogFileSize=64m
  31. 9-:-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
  32. 9-:-Djava.locale.providers=COMPAT
  33. 10-:-XX:UseAVX=2

3.3 开启安全认证

3.3.1 生成节点证书

– 只需在一个节点生成凭证即可

3.3.1.1 创建证书办法机构CA
  1. # esuser用户操作,在其中一节点操作
  2. cd /home/esuser/deploy/elasticsearch-7.13.2-9300
  3. [esuser@xsky-node1 elasticsearch-7.13.2-9300]$ ./bin/elasticsearch-certutil ca
  4. This tool assists you in the generation of X.509 certificates and certificate
  5. signing requests for use with SSL/TLS in the Elastic stack.
  6. The 'ca' mode generates a new 'certificate authority'
  7. This will create a new X.509 certificate and private key that can be used
  8. to sign certificate when running in 'cert' mode.
  9. Use the 'ca-dn' option if you wish to configure the 'distinguished name'
  10. of the certificate authority
  11. By default the 'ca' mode produces a single PKCS#12 output file which holds:
  12. * The CA certificate
  13. * The CA's private key
  14. If you elect to generate PEM format certificates (the -pem option), then the output will
  15. be a zip file containing individual files for the CA certificate and private key
  16. Please enter the desired output file [elastic-stack-ca.p12]: # 按回车
  17. Enter password for elastic-stack-ca.p12 : # 按回车
  18. # 该命令默认在当前目录生成elastic-stack-ca.p12 单个证书文件,该文件是PKCS#12密钥库
  19. # 其中包含CA的公共证书和用于对每个节点的证书签名的私钥
3.3.1.2 生成证书和私钥
  1. # esuser用户操作,在其中一节点操作
  2. [esuser@xsky-node1 elasticsearch-7.13.2-9300]$ ./bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12
  3. This tool assists you in the generation of X.509 certificates and certificate
  4. signing requests for use with SSL/TLS in the Elastic stack.
  5. The 'cert' mode generates X.509 certificate and private keys.
  6. * By default, this generates a single certificate and key for use
  7. on a single instance.
  8. * The '-multiple' option will prompt you to enter details for multiple
  9. instances and will generate a certificate and key for each one
  10. * The '-in' option allows for the certificate generation to be automated by describing
  11. the details of each instance in a YAML file
  12. * An instance is any piece of the Elastic Stack that requires an SSL certificate.
  13. Depending on your configuration, Elasticsearch, Logstash, Kibana, and Beats
  14. may all require a certificate and private key.
  15. * The minimum required value for each instance is a name. This can simply be the
  16. hostname, which will be used as the Common Name of the certificate. A full
  17. distinguished name may also be used.
  18. * A filename value may be required for each instance. This is necessary when the
  19. name would result in an invalid file or directory name. The name provided here
  20. is used as the directory name (within the zip) and the prefix for the key and
  21. certificate files. The filename is required if you are prompted and the name
  22. is not displayed in the prompt.
  23. * IP addresses and DNS names are optional. Multiple values can be specified as a
  24. comma separated string. If no IP addresses or DNS names are provided, you may
  25. disable hostname verification in your SSL configuration.
  26. * All certificates generated by this tool will be signed by a certificate authority (CA)
  27. unless the --self-signed command line option is specified.
  28. The tool can automatically generate a new CA for you, or you can provide your own with
  29. the --ca or --ca-cert command line options.
  30. By default the 'cert' mode produces a single PKCS#12 output file which holds:
  31. * The instance certificate
  32. * The private key for the instance certificate
  33. * The CA certificate
  34. If you specify any of the following options:
  35. * -pem (PEM formatted output)
  36. * -keep-ca-key (retain generated CA key)
  37. * -multiple (generate multiple certificates)
  38. * -in (generate certificates from an input file)
  39. then the output will be be a zip file containing individual certificate/key files
  40. Enter password for CA (elastic-stack-ca.p12) : # 按回车
  41. Please enter the desired output file [elastic-certificates.p12]: # 按回车
  42. Enter password for elastic-certificates.p12 : # 按回车
  43. Certificates written to /home/esuser/deploy/elasticsearch-7.13.2-9300/elastic-certificates.p12
  44. This file should be properly secured as it contains the private key for
  45. your instance.
  46. This file is a self contained file and can be copied and used 'as is'
  47. For each Elastic product that you wish to configure, you should copy
  48. this '.p12' file to the relevant configuration directory
  49. and then follow the SSL configuration instructions in the product guide.
  50. For client applications, you may only need to copy the CA certificate and
  51. configure the client to trust this certificate.
  52. # 命令执行完后会在当前目录生成elastic-certificates.p12文件,此文件是各个节点通信凭证
3.3.1.3 移动凭证到指定目录
  1. # esuser用户,每个节点都需操作
  2. # 创建目录
  3. mkdir ~$ES_HOME/config/certs
  4. # 移动凭证到指定目录
  5. mv elastic-certificates.p12 ~$ES_HOME/config/certs
  6. mv elastic-stack-ca.p12 ~$ES_HOME/config/certs
  7. # 设置权限
  8. chmod 777 ~$ES_HOME/config/certs/elastic*.p12

3.3.2 拷贝文件

  1. # 当以上操作完成后,我们可以将在10.110.7.39上的deploy打包拷贝到其它物理服务器,并对每台物理服务器上的elasticsearch.yml文件进行对应修改
  2. # 只需调整 node.name、network.host,要分别和当前节点对应
  3. [root@xsky-node1 ~]# su - esuser
  4. [esuser@xsky-node1 ~]$ tar -cf deploy.tar ./deploy
  5. [esuser@xsky-node1 ~]$ scp deploy.tar 10.110.7.40:/home/esuser
  6. [esuser@xsky-node1 ~]$ scp deploy.tar 10.110.7.41:/home/esuser
  7. # 然后分别使用esuser用户在10.110.7.40/41解压deploy.tar,修改对应节点的elasticsearch.yml文件

3.3.3 启动验证

  1. -- 10.110.7.39
  2. [root@xsky-node1 ~]# su esuser
  3. [esuser@xsky-node1 root]$ cd /home/esuser/deploy
  4. [esuser@xsky-node1 deploy]$ ./elasticsearch-7.13.2-9300/bin/elasticsearch
  5. [esuser@xsky-node1 deploy]$ ./elasticsearch-7.13.2-9301/bin/elasticsearch
  6. -- 10.110.7.40
  7. [root@xsky-node1 ~]# su esuser
  8. [esuser@xsky-node2 root]$ cd /home/esuser/deploy
  9. [esuser@xsky-node2 deploy]$ ./elasticsearch-7.13.2-9300/bin/elasticsearch
  10. [esuser@xsky-node2 deploy]$ ./elasticsearch-7.13.2-9301/bin/elasticsearch
  11. -- 10.110.7.41
  12. [root@xsky-node1 ~]# su esuser
  13. [esuser@xsky-node3 root]$ cd /home/esuser/deploy
  14. [esuser@xsky-node3 deploy]$ ./elasticsearch-7.13.2-9300/bin/elasticsearch
  15. [esuser@xsky-node3 deploy]$ ./elasticsearch-7.13.2-9301/bin/elasticsearch

此时,待启动日志里不再报 master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster,其它节点已加入集群,再进行设置密码操作。

3.3.4 设置密码

使用esuser用户,只需在其中一个节点执行

  1. # esuser用户
  2. [root@xsky-node1 ~]# su - esuser
  3. [esuser@xsky-node1 elasticsearch-7.13.2-9300]$ ./bin/elasticsearch-setup-passwords interactive
  4. Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
  5. You will be prompted to enter passwords as the process progresses.
  6. Please confirm that you would like to continue [y/N]y # 输入y,按回车
  7. Enter password for [elastic]:
  8. Reenter password for [elastic]:
  9. Enter password for [apm_system]:
  10. Reenter password for [apm_system]:
  11. Enter password for [kibana_system]:
  12. Reenter password for [kibana_system]:
  13. Enter password for [logstash_system]:
  14. Reenter password for [logstash_system]:
  15. Enter password for [beats_system]:
  16. Reenter password for [beats_system]:
  17. Enter password for [remote_monitoring_user]:
  18. Reenter password for [remote_monitoring_user]:
  19. Changed password for user [apm_system]
  20. Changed password for user [kibana_system]
  21. Changed password for user [kibana]
  22. Changed password for user [logstash_system]
  23. Changed password for user [beats_system]
  24. Changed password for user [remote_monitoring_user]
  25. Changed password for user [elastic]
  26. # 还可以使用auto命令自动创建密码,如下所示:
  27. -rw-r--r-- 1 esuser esuser 2710 Jun 11 2021 README.asciidoc
  28. [esuser@xsky-node1 elasticsearch-7.13.2-9300]$ ./bin/elasticsearch-setup-passwords auto
  29. Initiating the setup of passwords for reserved users elastic,apm_system,kibana,kibana_system,logstash_system,beats_system,remote_monitoring_user.
  30. The passwords will be randomly generated and printed to the console.
  31. Please confirm that you would like to continue [y/N]y
  32. Changed password for user apm_system
  33. PASSWORD apm_system = ACZcJwVF3PO9P0NTKW2g
  34. Changed password for user kibana_system
  35. PASSWORD kibana_system = 3V9pXFd0X0C7Hwud7dyW
  36. Changed password for user kibana
  37. PASSWORD kibana = 3V9pXFd0X0C7Hwud7dyW
  38. Changed password for user logstash_system
  39. PASSWORD logstash_system = 4DNP3g7wljAfT0Arqnka
  40. Changed password for user beats_system
  41. PASSWORD beats_system = PauMKgnG10iZ5lN8HI9A
  42. Changed password for user remote_monitoring_user
  43. PASSWORD remote_monitoring_user = tCEzXCmupyZx43GST9Cs
  44. Changed password for user elastic
  45. PASSWORD elastic = 8sLIYpBKixfvD3KX8DE9

3.3.5 浏览器查看验证

1) 方式一

打开浏览器,输入 http://10.110.7.39:9200, 注意账号是 elastic,而非自己创建的普通用户,密码是设置的密码

image.png

输出结果如下:

  1. {
  2. "name" : "node-7.39-9300",
  3. "cluster_name" : "es-cluster",
  4. "cluster_uuid" : "YJieTmJ4Qa6DjZE4j4Ba1Q",
  5. "version" : {
  6. "number" : "7.13.2",
  7. "build_flavor" : "default",
  8. "build_type" : "tar",
  9. "build_hash" : "4d960a0733be83dd2543ca018aa4ddc42e956800",
  10. "build_date" : "2021-06-10T21:01:55.251515791Z",
  11. "build_snapshot" : false,
  12. "lucene_version" : "8.8.2",
  13. "minimum_wire_compatibility_version" : "6.8.0",
  14. "minimum_index_compatibility_version" : "6.0.0-beta1"
  15. },
  16. "tagline" : "You Know, for Search"
  17. }

2)方式二

curl -XGET -u elastic:password http://:端口号/_cluster/health?pretty

  1. [root@xsky-node1 ~]# curl -XGET -u elastic:esuser123 http://10.110.7.39:9200/_cluster/health?pretty
  2. {
  3. "cluster_name" : "es-cluster",
  4. "status" : "green",
  5. "timed_out" : false,
  6. "number_of_nodes" : 6,
  7. "number_of_data_nodes" : 6,
  8. "active_primary_shards" : 1,
  9. "active_shards" : 2,
  10. "relocating_shards" : 0,
  11. "initializing_shards" : 0,
  12. "unassigned_shards" : 0,
  13. "delayed_unassigned_shards" : 0,
  14. "number_of_pending_tasks" : 0,
  15. "number_of_in_flight_fetch" : 0,
  16. "task_max_waiting_in_queue_millis" : 0,
  17. "active_shards_percent_as_number" : 100.0
  18. }
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/844655
推荐阅读
相关标签
  

闽ICP备14008679号