https://github.com/derekahn/elk-stack
π¦The ELK stack powered by docker-compose π³
https://github.com/derekahn/elk-stack
docker docker-compose elasticsearch elk elk-stack kibana logstash
Last synced: about 2 months ago
JSON representation
π¦The ELK stack powered by docker-compose π³
- Host: GitHub
- URL: https://github.com/derekahn/elk-stack
- Owner: derekahn
- Created: 2018-07-03T16:48:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-03T18:12:59.000Z (almost 8 years ago)
- Last Synced: 2025-03-29T11:36:00.992Z (about 1 year ago)
- Topics: docker, docker-compose, elasticsearch, elk, elk-stack, kibana, logstash
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π¦ ELK Stack
A simple [ELK](https://www.elastic.co/elk-stack) setup with docker-compose inspired by [deviantony](https://github.com/deviantony/docker-elk).
Utilizing the official Docker images from Elastic, with exposed ports:
* [elasticsearch](https://github.com/elastic/elasticsearch-docker)
* 9200: Elasticsearch HTTP
* 9300: Elasticsearch TCP transport
* [logstash](https://github.com/elastic/logstash-docker)
* 5000: Logstash TCP input
* [kibana](https://github.com/elastic/kibana-docker)
* 5601: Kibana
## π§ Setup
#### FIRST setup .env file in root
`.env` example:
```shell
# General
ELASTIC_VERSION=6.3.0
ES_JAVA_OPTS=-Xmx256m -Xms256m
# elasticsearch
CLUSTER_NAME=elk-docker-cluster
NETWORK_HOST=0.0.0.0
DISCOVERY_ZEN_MINIMUM_MASTER_NODES=1
DISCOVERY_TYPE=single-node
# logstash
HTTP_HOST=0.0.0.0
PATH_CONFIG=/usr/share/logstash/pipeline
# kibana
SERVER_NAME=kibana
SERVER_HOST=0
ELASTICSEARCH_URL=http://elasticsearch:9200
```
| Variable | Description |
| :---------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| kibana |
|
| ELASTIC_VERSION | Sync stack versions |
| ES_JAVA_OPTS | [JVM Tuning](https://github.com/deviantony/docker-elk#jvm-tuning) |
|
|
|
| elasticsearch |
|
| CLUSTER_NAME | [Cluster Description](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.name.html) |
| NETWORK_HOST | [To communicate and form a cluster with nodes on the servers](https://www.elastic.co/guide/en/elasticsearch/reference/current/network.host.html) |
| NETWORK_HOST | [To prevent data loss](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/discovery-settings.html#minimum_master_nodes) |
| DISCOVERY_TYPE | [For testing usage of transport client](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/bootstrap-checks.html#single-node-discovery) |
|
|
|
| logstash |
|
| HTTP_HOST | [To set the http.bind_host and the http.publish_host](https://www.elastic.co/guide/en/elasticsearch/reference/6.3/modules-http.html) |
| PATH_CONFIG | [Location of pipline configs](https://www.elastic.co/blog/logstash-multiple-pipelines) |
|
|
|
| kibana |
|
| SERVER_NAME | [A human-readable display name that identifies this Kibana instance](https://www.elastic.co/guide/en/kibana/current/settings.html) |
| SERVER_HOST | [This setting specifies the host of the back end server](https://www.elastic.co/guide/en/kibana/current/settings.html) |
| ELASTICSEARCH_URL | [The URL of the Elasticsearch instance to use for all your queries](https://www.elastic.co/guide/en/kibana/current/settings.html) |
## π Usage
```console
# Create and configure
$ touch .env && vim $_
# start
$ docker-compose up
# stop
$ doccker-compose down
```