{"id":21273537,"url":"https://github.com/graphaware/docker-elk","last_synced_at":"2026-02-11T00:38:23.003Z","repository":{"id":69925513,"uuid":"81231318","full_name":"graphaware/docker-elk","owner":"graphaware","description":null,"archived":false,"fork":false,"pushed_at":"2017-02-07T16:50:59.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-26T07:26:57.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphaware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-07T16:50:37.000Z","updated_at":"2020-02-03T18:09:31.000Z","dependencies_parsed_at":"2023-03-11T07:34:36.299Z","dependency_job_id":null,"html_url":"https://github.com/graphaware/docker-elk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/graphaware/docker-elk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fdocker-elk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fdocker-elk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fdocker-elk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fdocker-elk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphaware","download_url":"https://codeload.github.com/graphaware/docker-elk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphaware%2Fdocker-elk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29323944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T00:34:26.354Z","status":"ssl_error","status_checked_at":"2026-02-11T00:34:09.494Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T09:15:22.090Z","updated_at":"2026-02-11T00:38:22.967Z","avatar_url":"https://github.com/graphaware.png","language":null,"readme":"# Docker ELK stack\n\n[![Join the chat at https://gitter.im/deviantony/docker-elk](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/deviantony/docker-elk?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nRun the latest version of the ELK (Elasticseach, Logstash, Kibana) stack with Docker and Docker-compose.\n\nIt will give you the ability to analyze any data set by using the searching/aggregation capabilities of Elasticseach and the visualization power of Kibana.\n\nBased on the official images:\n\n* [elasticsearch](https://registry.hub.docker.com/_/elasticsearch/)\n* [logstash](https://registry.hub.docker.com/_/logstash/)\n* [kibana](https://registry.hub.docker.com/_/kibana/)\n\n**Note**: Other branches in this project are available:\n\n* ELK 5 with X-Pack support: https://github.com/deviantony/docker-elk/tree/x-pack\n* ELK 5 in Vagrant: https://github.com/deviantony/docker-elk/tree/vagrant\n* ELK 5 with Search Guard: https://github.com/deviantony/docker-elk/tree/searchguard\n\n# Requirements\n\n## Setup\n\n1. Install [Docker](http://docker.io).\n2. Install [Docker-compose](http://docs.docker.com/compose/install/) **version \u003e= 1.6**.\n3. Clone this repository\n\n## Increase max_map_count on your host (Linux)\n\nYou need to increase `max_map_count` on your Docker host:\n\n```bash\n$ sudo sysctl -w vm.max_map_count=262144\n```\n\n## SELinux\n\nOn distributions which have SELinux enabled out-of-the-box you will need to either re-context the files or set SELinux into Permissive mode in order for docker-elk to start properly.\nFor example on Redhat and CentOS, the following will apply the proper context:\n\n```bash\n.-root@centos ~\n-$ chcon -R system_u:object_r:admin_home_t:s0 docker-elk/\n```\n\n# Usage\n\nStart the ELK stack using *docker-compose*:\n\n```bash\n$ docker-compose up\n```\n\nYou can also choose to run it in background (detached mode):\n\n```bash\n$ docker-compose up -d\n```\n\nNow that the stack is running, you'll want to inject logs in it. The shipped logstash configuration allows you to send content via tcp:\n\n```bash\n$ nc localhost 5000 \u003c /path/to/logfile.log\n```\n\nAnd then access Kibana UI by hitting [http://localhost:5601](http://localhost:5601) with a web browser.\n\n*NOTE*: You'll need to inject data into logstash before being able to create a logstash index in Kibana. Then all you should have to do is to hit the create button.\n\nSee: https://www.elastic.co/guide/en/kibana/current/setup.html#connect\n\nBy default, the stack exposes the following ports:\n* 5000: Logstash TCP input.\n* 9200: Elasticsearch HTTP\n* 9300: Elasticsearch TCP transport\n* 5601: Kibana\n\n*WARNING*: If you're using *boot2docker*, you must access it via the *boot2docker* IP address instead of *localhost*.\n\n*WARNING*: If you're using *Docker Toolbox*, you must access it via the *docker-machine* IP address instead of *localhost*.\n\n# Configuration\n\n*NOTE*: Configuration is not dynamically reloaded, you will need to restart the stack after any change in the configuration of a component.\n\n## How can I tune Kibana configuration?\n\nThe Kibana default configuration is stored in `kibana/config/kibana.yml`.\n\n## How can I tune Logstash configuration?\n\nThe logstash configuration is stored in `logstash/config/logstash.conf`.\n\nThe folder `logstash/config` is mapped onto the container `/etc/logstash/conf.d` so you\ncan create more than one file in that folder if you'd like to. However, you must be aware that config files will be read from the directory in alphabetical order.\n\n## How can I specify the amount of memory used by Logstash?\n\nThe Logstash container use the *LS_HEAP_SIZE* environment variable to determine how much memory should be associated to the JVM heap memory (defaults to 500m).\n\nIf you want to override the default configuration, add the *LS_HEAP_SIZE* environment variable to the container in the `docker-compose.yml`:\n\n```yml\nlogstash:\n  build: logstash/\n  command: -f /etc/logstash/conf.d/\n  volumes:\n    - ./logstash/config:/etc/logstash/conf.d\n  ports:\n    - \"5000:5000\"\n  networks:\n    - docker_elk\n  depends_on:\n    - elasticsearch\n  environment:\n    - LS_HEAP_SIZE=2048m\n```\n\n## How can I add Logstash plugins? ##\n\nTo add plugins to logstash you have to:\n\n1. Add a RUN statement to the `logstash/Dockerfile` (ex. `RUN logstash-plugin install logstash-filter-json`)\n2. Add the associated plugin code configuration to the `logstash/config/logstash.conf` file\n\n## How can I enable a remote JMX connection to Logstash?\n\nAs for the Java heap memory, another environment variable allows to specify JAVA_OPTS used by Logstash. You'll need to specify the appropriate options to enable JMX and map the JMX port on the docker host.\n\nUpdate the container in the `docker-compose.yml` to add the *LS_JAVA_OPTS* environment variable with the following content (I've mapped the JMX service on the port 18080, you can change that), do not forget to update the *-Djava.rmi.server.hostname* option with the IP address of your Docker host (replace **DOCKER_HOST_IP**):\n\n```yml\nlogstash:\n  build: logstash/\n  command: -f /etc/logstash/conf.d/\n  volumes:\n    - ./logstash/config:/etc/logstash/conf.d\n  ports:\n    - \"5000:5000\"\n  networks:\n    - docker_elk\n  depends_on:\n    - elasticsearch\n  environment:\n    - LS_JAVA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=18080 -Dcom.sun.management.jmxremote.rmi.port=18080 -Djava.rmi.server.hostname=DOCKER_HOST_IP -Dcom.sun.management.jmxremote.local.only=false\n```\n\n## How can I tune Elasticsearch configuration?\n\nThe Elasticsearch container is using the shipped configuration and it is not exposed by default.\n\nIf you want to override the default configuration, create a file `elasticsearch/config/elasticsearch.yml` and add your configuration in it.\n\nThen, you'll need to map your configuration file inside the container in the `docker-compose.yml`. Update the elasticsearch container declaration to:\n\n```yml\nelasticsearch:\n  build: elasticsearch/\n  ports:\n    - \"9200:9200\"\n    - \"9300:9300\"\n  environment:\n    ES_JAVA_OPTS: \"-Xms1g -Xmx1g\"\n  networks:\n    - docker_elk\n  volumes:\n    - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml\n```\n\nYou can also specify the options you want to override directly in the command field:\n\n```yml\nelasticsearch:\n  build: elasticsearch/\n  command: elasticsearch -Des.network.host=_non_loopback_ -Des.cluster.name: my-cluster\n  ports:\n    - \"9200:9200\"\n    - \"9300:9300\"\n  environment:\n    ES_JAVA_OPTS: \"-Xms1g -Xmx1g\"\n  networks:\n    - docker_elk\n```\n\n# Storage\n\n## How can I store Elasticsearch data?\n\nThe data stored in Elasticsearch will be persisted after container reboot but not after container removal.\n\nIn order to persist Elasticsearch data even after removing the Elasticsearch container, you'll have to mount a volume on your Docker host. Update the elasticsearch container declaration to:\n\n```yml\nelasticsearch:\n  build: elasticsearch/\n  command: elasticsearch -Des.network.host=_non_loopback_ -Des.cluster.name: my-cluster\n  ports:\n    - \"9200:9200\"\n    - \"9300:9300\"\n  environment:\n    ES_JAVA_OPTS: \"-Xms1g -Xmx1g\"\n  networks:\n    - docker_elk\n  volumes:\n    - /path/to/storage:/usr/share/elasticsearch/data\n```\n\nThis will store elasticsearch data inside `/path/to/storage`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fdocker-elk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphaware%2Fdocker-elk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphaware%2Fdocker-elk/lists"}