{"id":21322110,"url":"https://github.com/advantageous/docker-elk-all","last_synced_at":"2026-01-02T18:03:01.477Z","repository":{"id":77190883,"uuid":"63983542","full_name":"advantageous/docker-elk-all","owner":"advantageous","description":"Docker ELK stack that is Logback compatible. ","archived":false,"fork":false,"pushed_at":"2016-07-22T21:57:21.000Z","size":4,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T11:48:00.210Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/advantageous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-07-22T21:11:36.000Z","updated_at":"2017-12-27T02:54:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"331a21c5-d6b6-43c5-8852-6d39c62f04a2","html_url":"https://github.com/advantageous/docker-elk-all","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-elk-all","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-elk-all/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-elk-all/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/advantageous%2Fdocker-elk-all/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/advantageous","download_url":"https://codeload.github.com/advantageous/docker-elk-all/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801612,"owners_count":20350106,"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":[],"created_at":"2024-11-21T20:13:19.082Z","updated_at":"2026-01-02T18:02:56.442Z","avatar_url":"https://github.com/advantageous.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-elk-all\nDocker ELK stack that is Logback compatible.\n(UDP input with JSON codec and elastic search output with JSON codec.)\n\n## Where\nThis is deployed as [Docker image advantageous/elk](https://hub.docker.com/r/advantageous/elk/)\non docker hub. The source code for this build is at [github](https://github.com/advantageous/docker-elk-all).\n\n## How\nThe source is config files and a [Packer build project](https://www.packer.io/intro/)\nto create a Docker image based on [sebp/elk](https://hub.docker.com/r/sebp/elk/).\n\n## What\nThe [sebp/elk](https://hub.docker.com/r/sebp/elk/) has excellent\n[documentation](http://elk-docker.readthedocs.io/).\n\n## Why\nThe issue we had with *sebp/elk* docker image was that it was setup for\n[Beats](https://www.elastic.co/products/beats)/[Lumberjack](https://github.com/elastic/logstash-forwarder)\nlog file ingestion and not for use with [Logback](http://logback.qos.ch/) which\nsends log data, extra fields and MDC via a JSON codec.\n\n## Adding Logback support UDP and JSON input/output\n\nTo support Logback we had to add support for JSON codec output to elastic search.\n\n#### 30-output.conf\n```ruby\noutput {\n  elasticsearch {\n    hosts =\u003e [\"localhost\"]\n    sniffing =\u003e true\n    codec =\u003e json\n  }\n}\n```\n\nWe also added support for UDP ingestion.\n\n#### 50-udp.json\n```ruby\ninput {\n    udp {\n        port =\u003e 5001\n        codec =\u003e json\n    }\n}\n```\n\n## Use\n\nTo configure Logback you will need logback and the\n[Logback logstash appender](https://github.com/logstash/logstash-logback-encoder).\n\nThen just add the following to a logback.xml config file in your Java project.\n\n#### logback.xml\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cconfiguration\u003e\n\n    \u003cappender name=\"STASH-UDP\" class=\"net.logstash.logback.appender.LogstashSocketAppender\"\u003e\n        \u003chost\u003e192.168.99.100\u003c/host\u003e\n        \u003cport\u003e5001\u003c/port\u003e\n    \u003c/appender\u003e\n\n\n    \u003croot level=\"INFO\"\u003e\n        \u003cappender-ref ref=\"STASH-UDP\"/\u003e\n    \u003c/root\u003e\n\n    \u003clogger name=\"com.mycompany\" level=\"INFO\"/\u003e\n\n\u003c/configuration\u003e\n```\n\nTo deploy this with the [advantageous gradle docker plugin](https://github.com/advantageous/docker-test-plugin),\ndo the following:\n\n#### gradle build.gradle\n```java\n\nplugins {\n    id \"io.advantageous.docker-test\" version \"0.1.6\"\n}\n\n...\n\ntestDockerContainers {\n    elk {\n        containerName \"elk-app\"\n        image \"advantageous/elk:0.1\"\n        portMapping(container: 9200, host: 9200)\n        portMapping(container: 5044, host: 5044)\n        portMapping(container: 5000, host: 5000)\n        portMapping(container: 5601, host: 5601)\n        portMapping(container: \"5001/udp\", host: 5001)\n        runArgs \" /usr/local/bin/start.sh \"\n    }\n}\n```\n\nOr run it with docker command line as follows:\n\n```sh\n $ docker run -d -p 9200:9200 -p 5044:5044 -p 5000:5000 -p 5601:5601 \\\n          -p 5001:5001/udp --name=elk-df advantageous/elk:0.1  \\\n          /usr/local/bin/start.sh\n```\n\nNote that start.sh starts the ELK stack as unix services.\n\n## Build\n\n* [Install packer](https://www.packer.io/intro/getting-started/setup.html).\n* Check out the project from [github](https://github.com/advantageous/docker-elk-all).\n* Go to the project folder and run packer build as follows.\n\n```sh\n$ packer build elk-docker.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvantageous%2Fdocker-elk-all","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadvantageous%2Fdocker-elk-all","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadvantageous%2Fdocker-elk-all/lists"}