Es 和 kibana 文件分享

  • TODO

运行

检查ES是否启动成功

  • http://localhost:9200/?pretty
    1. {
    2. "name": "DESKTOP-GLN16RV", # node名称
    3. "cluster_name": "my-application", # 集群名称(默认的集群名称就是elasticsearch
    4. "cluster_uuid": "FkAq7XjlQbqiXUgdaFNE_w",
    5. "version": {
    6. "number": "7.3.2", # es版本号
    7. "build_flavor": "default",
    8. "build_type": "zip",
    9. "build_hash": "1c1faf1",
    10. "build_date": "2019-09-06T14:40:30.409026Z",
    11. "build_snapshot": false,
    12. "lucene_version": "8.1.0",
    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. }

集群设置

  1. # ======================== Elasticsearch Configuration =========================
  2. #
  3. # NOTE: Elasticsearch comes with reasonable defaults for most settings.
  4. # Before you set out to tweak and tune the configuration, make sure you
  5. # understand what are you trying to accomplish and the consequences.
  6. #
  7. # The primary way of configuring a node is via this file. This template lists
  8. # the most important settings you may want to configure for a production cluster.
  9. #
  10. # Please consult the documentation for further information on configuration options:
  11. # https://www.elastic.co/guide/en/elasticsearch/reference/index.html
  12. #
  13. # ---------------------------------- Cluster -----------------------------------
  14. #
  15. # Use a descriptive name for your cluster:
  16. #
  17. # 集群名称
  18. cluster.name: my-application
  19. #
  20. # ------------------------------------ Node ------------------------------------
  21. #
  22. # Use a descriptive name for the node:
  23. #
  24. # 节点名称
  25. node.name: node-1
  26. #
  27. # Add custom attributes to the node:
  28. #
  29. #node.attr.rack: r1
  30. #
  31. # ----------------------------------- Paths ------------------------------------
  32. #
  33. # Path to directory where to store the data (separate multiple locations by comma):
  34. #
  35. #path.data: /path/to/data
  36. #
  37. # Path to log files:
  38. #
  39. #path.logs: /path/to/logs
  40. #
  41. # ----------------------------------- Memory -----------------------------------
  42. #
  43. # Lock the memory on startup:
  44. #
  45. #bootstrap.memory_lock: true
  46. #
  47. # Make sure that the heap size is set to about half the memory available
  48. # on the system and that the owner of the process is allowed to use this
  49. # limit.
  50. #
  51. # Elasticsearch performs poorly when the system is swapping the memory.
  52. #
  53. # ---------------------------------- Network -----------------------------------
  54. #
  55. # Set the bind address to a specific IP (IPv4 or IPv6):
  56. #
  57. # 设置节点host
  58. network.host: 127.0.0.1
  59. #
  60. # Set a custom port for HTTP:
  61. #
  62. # 设置节点端口
  63. http.port: 9200
  64. # 节点数据传递端口
  65. transport.tcp.port: 9300
  66. # 跨域设置
  67. http.cors.enabled: true
  68. http.cors.allow-origin: "*"
  69. #
  70. # For more information, consult the network module documentation.
  71. #
  72. # --------------------------------- Discovery ----------------------------------
  73. #
  74. # Pass an initial list of hosts to perform discovery when this node is started:
  75. # The default list of hosts is ["127.0.0.1", "[::1]"]
  76. #
  77. # 集群内节点 host:transport_port
  78. discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
  79. #
  80. # Bootstrap the cluster using an initial set of master-eligible nodes:
  81. #
  82. # 有资格竞选主的节点
  83. cluster.initial_master_nodes: ["node-1", "node-2", "node-3"]
  84. #
  85. # For more information, consult the discovery and cluster formation module documentation.
  86. #
  87. # ---------------------------------- Gateway -----------------------------------
  88. #
  89. # Block initial recovery after a full cluster restart until N nodes are started:
  90. #
  91. #gateway.recover_after_nodes: 3
  92. #
  93. # For more information, consult the gateway module documentation.
  94. #
  95. # ---------------------------------- Various -----------------------------------
  96. #
  97. # Require explicit names when deleting indices:
  98. #
  99. #action.destructive_requires_name: true