[Version] Split Docker-compose a single construct Kibana example, based 7.1.0

Written on the front

This morning, when this has run throughout the Docker-compose built ELK cluster together, and a little not boil live, so fill up in the morning documentation, today on the company's test server to test the good Ferguson.

In this article it is part of the red line, but a start Kibana instance, es-tribe node connected to the cluster Es to complete the connection through it.

See my article to configure the source Git repository https://github.com/hellxz/docker-kibana.git

Port occupancy

Directory name Container name Occupied port number
docker-kibana kibana 5601

File Structure

├── docker-compose.yml
└── .env

This may be the least of this ELK cluster configuration, ha ha

File Description

.envTo docker-compose.ymlprovide a host Ip es-tribe nodes to be connected

# just for kibana docker-compose.yml
# this host-ip is elasticsearch tribe-node's machine ip.
ES_TRIBE_HOST=10.2.114.110

The pair is docker-compose.ymlwe can see .envin ES_TRIBE_HOSTthe node position 9204 the combined exposure es-tribe

version: "3"
services:
    kibana:
        image: kibana:7.1.0
        container_name: kibana
        environment:
            - ELASTICSEARCH_HOSTS=http://${ES_TRIBE_HOST}:9204 # connect the es-balance node
            - I18N_LOCALE=zh-CN #汉化
        ports:
            - "5601:5601"
        network_mode: "host"

Here there is only one directory, do not write a script to start and end the need is not very high.

Instructions for use

  1. ES es-tribe ensure cluster node host can Ping through
  2. Ensure es-tribe node is in service state
  3. Modification .envof ES_TRIBE_HOSTthe value to the host Ip es-tribe of
  4. Execution docker-compose up -dto start the program execution docker-compose downto close the program

So far ELK cluster to build a series of articles the end, the end Sahua

This article is the original article, declined to reprint

Guess you like

Origin www.cnblogs.com/hellxz/p/docker-compose_kibana.html