{"id":13749982,"url":"https://github.com/pblittle/docker-logstash","last_synced_at":"2025-05-09T13:31:46.301Z","repository":{"id":13802851,"uuid":"16498665","full_name":"pblittle/docker-logstash","owner":"pblittle","description":"Docker image for Logstash 1.4","archived":false,"fork":false,"pushed_at":"2015-12-21T15:15:49.000Z","size":215,"stargazers_count":237,"open_issues_count":0,"forks_count":90,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-04T07:04:14.463Z","etag":null,"topics":["docker","elasticsearch","elk","kibana","logstash"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/pblittle/docker-logstash","language":"Shell","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/pblittle.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}},"created_at":"2014-02-04T01:09:32.000Z","updated_at":"2024-03-22T13:16:26.000Z","dependencies_parsed_at":"2022-09-06T12:20:38.386Z","dependency_job_id":null,"html_url":"https://github.com/pblittle/docker-logstash","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pblittle%2Fdocker-logstash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pblittle%2Fdocker-logstash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pblittle%2Fdocker-logstash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pblittle%2Fdocker-logstash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pblittle","download_url":"https://codeload.github.com/pblittle/docker-logstash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224866698,"owners_count":17382875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","elasticsearch","elk","kibana","logstash"],"created_at":"2024-08-03T07:01:21.061Z","updated_at":"2024-11-16T01:30:42.871Z","avatar_url":"https://github.com/pblittle.png","language":"Shell","readme":"# Logstash Dockerfile\n\nThis is a highly configurable [logstash][7] (1.4.5) image running [Elasticsearch][8] (1.7.0) and [Kibana][9] (3.1.2).\n\n## How to use this image\n\nTo run the image, you have to first decide which services you want to run in your container:\n\n#### Full ELK stack (default)\n\n````\n$ docker run -d \\\n  -p 9292:9292 \\\n  -p 9200:9200 \\\n  pblittle/docker-logstash\n````\n\n#### Logstash agent only\n\n````\n$ docker run \\\n  pblittle/docker-logstash \\\n  agent\n````\n\n#### Logstash config test only\n\n````\n$ docker run \\\n  pblittle/docker-logstash \\\n  configtest\n````\n\n#### Embedded Kibana web interface only\n\n````\n$ docker run \\\n  pblittle/docker-logstash \\\n  web\n````\n\n## Logstash configuration\n\nThere are currently two supported ways of including your Logstash config files in your container:\n\n  * Download your config files from the Internet\n  * Mount a volume on the host machine containing your config files\n\n\u003e Any files in `/opt/logstash/conf.d` with the `.conf` extension will get loaded by logstash.\n\n#### Download your config files from the Internet\n\nTo use your own hosted config files, your config files must be one of the following two file types:\n\n  * A monolithic config file (`*.conf`)\n  * A tarball containing your config files (`*.tar`, `*.tar.gz`, or `*.tgz`)\n\nWith your config files ready and in the correct format, set `LOGSTASH_CONFIG_URL` to your logstash config URL using the `-e` flag as follows:\n\n    $ docker run -d \\\n      -e LOGSTASH_CONFIG_URL=\u003cyour_logstash_config_url\u003e \\\n      -p 9292:9292 \\\n      -p 9200:9200 \\\n      pblittle/docker-logstash\n\nBy default, if `LOGSTASH_CONFIG_URL` isn't defined, an example [logstash.conf][2] will be downloaded and used in your container.\n\n\u003e The default `logstash.conf` only listens on `stdin` and `file` inputs. If you wish to configure `tcp` and/or `udp` input, use your own logstash configuration files and expose the ports yourself. See [logstash documentation][10] for config syntax and more information.\n\n#### Mount a volume containing your config files\n\nTo use config files from the local file system, mount the config directory as a volume using the `-v` flag. For example:\n\n    $ docker run -d \\\n      -v \u003cyour_logstash_config_dir\u003e:/opt/logstash/conf.d \\\n      -p 9292:9292 \\\n      -p 9200:9200 \\\n      pblittle/docker-logstash\n\n## Elasticsearch server integration\n\nIf you plan on using Elasticsearch, the following three integration methods are supported:\n\n * A linked container running Elasticsearch\n * An external Elasticsearch server\n * The embedded Elasticsearch server\n\n#### Linked container running Elasticsearch\n\nIf you want to link to a container running Elasticsearch, simply use the `--link` flag to connect to the container:\n\n    $ docker run -d \\\n      --link \u003cyour_es_container_name\u003e:es \\\n      -p 9292:9292 \\\n      pblittle/docker-logstash\n\nTo have the linked Elasticsearch container's `bind_host` and `port` automatically detected, you will need to set the `bind_host` and `port` to `ES_HOST` and `ES_PORT` respectively in your elasticsearch output config. For example:\n\n    output {\n      elasticsearch {\n        bind_host =\u003e \"ES_HOST\"\n        port =\u003e \"ES_PORT\"\n        protocol =\u003e \"http\"\n      }\n    }\n\nIf you are linking to an Elasticsearch container running on `172.0.4.20:9200`, the config above will be transformed into:\n\n    output {\n      elasticsearch {\n        host =\u003e \"172.0.4.20\"\n        port =\u003e \"9200\"\n        protocol =\u003e \"http\"\n      }\n    }\n\n#### External Elasticsearch server\n\nIf you are using an external Elasticsearch server, simply set the `ES_HOST` and `ES_PORT` environment variables in your `run` command:\n\n    $ docker run -d \\\n      -e ES_HOST=\u003cyour_es_service_host\u003e \\\n      -e ES_PORT=\u003cyour_es_service_port\u003e \\\n      -p \u003cyour_es_service_port\u003e=\u003cyour_es_service_port\u003e \\\n      -p 9292:9292 \\\n      pblittle/docker-logstash\n\n#### Embedded Elasticsearch server\n\nThe embedded Elasticsearch server will be used by default if you don't provide either of the configuration options above.\n\n\u003e Please note, the embedded Elasticsearch server was not designed for use in Production.\n\nTo make the data directory persistent, you can bind mount it with the following argument for `docker run`:\n\n    -v $PWD/data:/opt/logstash/data\n\n## Optional, build and run the image from source\n\nIf you prefer to build from source rather than use the [pblittle/docker-logstash][1] trusted build published to the public Docker Registry, execute the following:\n\n    $ git clone https://github.com/pblittle/docker-logstash.git\n    $ cd docker-logstash\n\n\u003e If you are using [Vagrant][3], you can build and run the container in a VM by executing:\n\u003e\n\u003e     $ vagrant up\n\u003e     $ vagrant ssh\n\u003e     $ cd /vagrant/1.4\n\nFrom there, build and run a container using the newly created virtual machine:\n\n    $ make\n\n## Finally, verify the installation\n\nYou can now verify the logstash installation by visiting the sample Kibana dashboard:\n\n    http://\u003cyour_container_ip\u003e:9292/index.html#/dashboard/file/default.json\n\n## Thank you\n\nA huge thank you to the project [Contributors][4] and users. I really appreciate the support.\n\n## Contributing\n\n1. Fork it\n2. Checkout the develop branch (`git checkout -b develop`)\n3. Create your feature branch (`git checkout -b my-new-feature`)\n4. Commit your changes (`git commit -am 'Add some feature'`)\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create new Pull Request\n\n## License\n\nThis application is distributed under the [Apache License, Version 2.0][5].\n\n[1]: https://registry.hub.docker.com/u/pblittle/docker-logstash\n[2]: https://gist.githubusercontent.com/pblittle/8778567/raw/logstash.conf\n[3]: https://www.vagrantup.com\n[4]: https://github.com/pblittle/docker-logstash/graphs/contributors\n[5]: http://www.apache.org/licenses/LICENSE-2.0\n[7]: https://www.elastic.co/products/logstash\n[8]: https://www.elastic.co/products/elasticsearch\n[9]: https://www.elastic.co/products/kibana\n[10]: https://www.elastic.co/guide/en/logstash/current/configuration.html\n","funding_links":[],"categories":["Shell","ELK Elastic Logstash Kibana"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpblittle%2Fdocker-logstash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpblittle%2Fdocker-logstash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpblittle%2Fdocker-logstash/lists"}