{"id":15576621,"url":"https://github.com/abn/docker-logstash-forwarder","last_synced_at":"2026-03-14T08:32:55.956Z","repository":{"id":36160682,"uuid":"40464755","full_name":"abn/docker-logstash-forwarder","owner":"abn","description":"logstash-forwarder in a scratch docker container","archived":false,"fork":false,"pushed_at":"2015-08-10T05:40:51.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-12T17:36:30.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abn.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":"2015-08-10T05:29:01.000Z","updated_at":"2015-08-10T05:31:41.000Z","dependencies_parsed_at":"2022-08-18T14:20:13.735Z","dependency_job_id":null,"html_url":"https://github.com/abn/docker-logstash-forwarder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/abn/docker-logstash-forwarder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-logstash-forwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-logstash-forwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-logstash-forwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-logstash-forwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abn","download_url":"https://codeload.github.com/abn/docker-logstash-forwarder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abn%2Fdocker-logstash-forwarder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28024530,"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","status":"online","status_checked_at":"2025-12-25T02:00:05.988Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-02T18:53:13.349Z","updated_at":"2025-12-25T08:18:50.245Z","avatar_url":"https://github.com/abn.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Logstash Forwarder Container\n\nThis project puts [Logstash Forwarder](https://github.com/elastic/logstash-forwarder) in scratch docker container. It is available on [Docker Hub](https://registry.hub.docker.com/u/alectolytic/logstash-forwarder/) and can be pulled using the following command.\n\n```sh\ndocker pull alectolytic/logstash-forwarder\n```\n\nYou will note that this is a tiny image.\n```\n$ docker images | grep docker.io/alectolytic/logstash-forwarder\ndocker.io/alectolytic/logstash-forwarder    latest    7170f359d1f7    2 hours ago    4.205 MB\n```\n\n## Quickstart Example\n\nIn this example we will capture the logs from an httpd container and forward it to a local running logstash container.\n\n#### Generate OpenSSL keys for logstash lumberjack plugin\n\n```sh\nopenssl req -x509  -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt -subj /CN=logstash\n```\n\n**NOTE:**\n- The `CN` value is the server name of the logstash server. Here, we make use of docker links to name the server as `logstash`.\n- If running on an SELinux enabled system, run `chcon -Rt svirt_sandbox_file_t /path/to/lumberjack.*` before using these files.\n\n#### Start logstash\n\n```sh\ndocker run -d --name logstash \\\n  logstash \\\n  -v `pwd`/lumberjack.key:/lumberjack.key \\\n  -v `pwd`/lumberjack.crt:/lumberjack.crt \\\n  logstash \\\n  logstash -e 'input { lumberjack { port =\u003e 12345 ssl_certificate =\u003e \"/lumberjack.crt\" ssl_key =\u003e \"/lumberjack.key\" } } output { stdout { } }'\n```\n\n#### Start httpd container\n\nNote the `local/httpd` is a Fedora 22 container running httpd.\n\n```sh\ndocker run -d --name httpd local/httpd\n```\n\n#### Start logstash-forwarder\n\nThe following configuration file was used in this example.\n\n```json\n{\n  \"network\": {\n    \"servers\": [ \"logstash:12345\" ],\n    \"ssl ca\": \"/lumberjack.crt\",\n    \"timeout\": 15\n  },\n  \"files\": [\n    {\n      \"paths\": [\n        \"/var/log/httpd/*_log\"\n      ],\n      \"fields\": { \"type\": \"apache\" }\n    }\n  ]\n}\n```\n\nOnce the created, fix SELinux lables by running:\n\n```sh\nchcon -Rt svirt_sandbox_file_t /path/to/logstash-forwarder.conf\n```\n\nThe container can be started as follows. In this scenario, we use the above configuration file, configure the use of the generated crt file as the `ssl ca`, linked the running logstash instance to be availabled with the hostname `logstash` and mount volumes from the running httpd container. Note that TLS authentication is not used but can be enabled.\n\n```sh\ndocker run --rm -it \\\n  -v `pwd`/logstash-forwarder.conf:/logstash-forwarder.conf \\\n  -v `pwd`/lumberjack.crt:/lumberjack.crt \\\n  --volumes-from httpd \\\n  --link logstash:logstash \\\n  alectolytic/logstash-forwarder\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fdocker-logstash-forwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabn%2Fdocker-logstash-forwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabn%2Fdocker-logstash-forwarder/lists"}