Note: All subsequent examples use Kibana

I. File download

  1. Download address: www.elastic.co/cn/download…
  2. History version: www.elastic.co/cn/download…
  3. Directly select the corresponding version to download

Two, module installation

The 2.1 Linux installation

  1. Create a new Kibana folder in the ES installation directory to store the module contents. Do not place them in plugins
    • /opt/es/kibana
  2. Decompress the installation package to kibana-7.8.0-linux-x86_64.tar.gz to the preceding directory
Java-zxvf kibana-7.8.0-linux-x86_64.tar.gz -c /opt/es/kibana/Copy the code

  1. Edit the config/kibana.yml configuration file and enable it
    • server.port: 5601
      • Enable port 5601 by default
    • Server host: “0.0.0.0”
      • Configure the ports that are allowed to access. Yes Enable all ports by default, and enable them online as required
    • elasticsearch.hosts: [“www.codecoord.com:9200”]
      • Configure ES to be connected. Use commas (,) to separate multiple ES
  2. Reassign permissions to all es users
    • chown -R es:es es
  3. There are two boot modes. Go to Kibana-7.8.0-linux-x86_64 /bin and run Kibana directly
    • Es users can start directly
      • ./kibana
    • The root user can also be started
      • ./kibana –allow-root
  4. Access the port and check whether the connection is successful
    • http://localhost:5601

2.2 Windows installation

  1. Download Kibana-7.8.0-Windows-x86_64.zip to decompress

  1. Edit the config/kibana.yml configuration file and enable it
    • server.port: 5601
      • Enable port 5601 by default
    • Server host: “0.0.0.0”
      • Configure the ports that are allowed to access. Yes Enable all ports by default, and enable them online as required
    • elasticsearch.hosts: [“http://localhost:9200”]
      • Configure ES to be connected. Use commas (,) to separate multiple ES
  2. Access the port and check whether the connection is successful
    • http://localhost:5601

Three, Kibana Chinese

  1. Kibana is English by default, i18N can be changed to Chinese
  2. Modify the config/kibana.yml configuration file and open i18n at the end of the file to Chinese
# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English - en , by default , Chinese - zh-CN .
#i18n.locale: "en"
# change to Chinese
i18n.locale: "zh-CN"
Copy the code
  1. Restart Kibana and the screen will switch to Chinese

4. Kibana connection

  1. Connect the index library through the home page

  1. Note that if the index library document is empty, it cannot be searched

  1. The document is available if it is not empty
    • Enter the name of the index to be associated in index mode

  1. Select create index mode

  1. After the index is created, the index information is displayed automatically

Five, command exercise

5.1 Simple Examples

  • After Chinese, the left menu has Chinese, and the command tool can be seen
  • The request format is as follows, which is equivalent to shorthand for the ES address and parameters outside the request header
Request method (uppercase [GET | POST | PUT | DELETE]) request path {} request bodyCopy the code
  • Reference sample

5.2 Example

  • Create a document
POST es/_doc/1
{
  "id": 1."title": "Huawei Phone"."category": "Huawei"."images": "http://www.gulixueyuan.com/xm.jpg"."price": 3999
}
Copy the code
  • Get the document
GET es/_doc/1
Copy the code
  • Delete the document
DELETE es/_doc/1
Copy the code