{"id":19076598,"url":"https://github.com/lizozom/docker-elastic-observability-with-apm","last_synced_at":"2025-06-20T08:10:42.414Z","repository":{"id":109914658,"uuid":"578099628","full_name":"lizozom/docker-elastic-observability-with-apm","owner":"lizozom","description":"Docker compose setup of an observability use case. Reporting metrics and traces from a nodejs app to Elasticsearch using APM Server using APM RUM and APM Node.js agents.","archived":false,"fork":false,"pushed_at":"2022-12-27T17:48:19.000Z","size":113,"stargazers_count":23,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-19T01:42:38.555Z","etag":null,"topics":["apm","docker","docker-compose","elasticsearch","express","kibana","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/lizozom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"sherifabdlnaby","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-12-14T08:59:04.000Z","updated_at":"2025-05-26T01:55:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"5aa7cd78-71bf-46a5-b66a-71bd92f0391f","html_url":"https://github.com/lizozom/docker-elastic-observability-with-apm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"sherifabdlnaby/elastdocker","purl":"pkg:github/lizozom/docker-elastic-observability-with-apm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizozom%2Fdocker-elastic-observability-with-apm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizozom%2Fdocker-elastic-observability-with-apm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizozom%2Fdocker-elastic-observability-with-apm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizozom%2Fdocker-elastic-observability-with-apm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lizozom","download_url":"https://codeload.github.com/lizozom/docker-elastic-observability-with-apm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lizozom%2Fdocker-elastic-observability-with-apm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260907194,"owners_count":23080615,"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":["apm","docker","docker-compose","elasticsearch","express","kibana","nodejs"],"created_at":"2024-11-09T02:00:13.914Z","updated_at":"2025-06-20T08:10:37.400Z","avatar_url":"https://github.com/lizozom.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/sherifabdlnaby"],"categories":[],"sub_categories":[],"readme":"\u003ch2 align=\"center\"\u003eObservability with Elasticsearch\u003c/h2\u003e\n\u003ch4 align=\"center\"\u003eAPM Node.js and APM RUM agents on \u003cb\u003eDocker\u003c/b\u003e\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/3016806/209703662-d63a9a32-18cd-4041-8a1e-eec401f708b5.png\"\u003e\u003c/p\u003e\n\n# Introduction\nElastic Stack (**ELK**) Docker Composition, with a Node.JS application reporting APM client + server side metrics and traces to APM Server.\n\nSuitable for Demoing and MVPs.\n\nStack Version: [8.5.3](https://www.elastic.co/blog/whats-new-elastic-8-5-3) 🎉  - Based on [Official Elastic Docker Images](https://www.docker.elastic.co/)\n\u003e You can change Elastic Stack version by setting `ELK_VERSION` in `.env` file and rebuild your images. Any version \u003e= 8.0.0 is compatible with this template.\n\nBased on [elastdocker](https://github.com/sherifabdlnaby/elastdocker)\n\n### Main Features 📜\n\n- Node.JS application with Node APM Agent.\n- Elasticsearch, configured as a Production Single Node Cluster.\n- Security Enabled on Elasticsearch and Kibana.\n- APM Server receives *Non secure* connections.\n- Use Docker-Compose and `.env` to configure your entire stack parameters.\n- Persist Elasticsearch's Keystore and SSL Certifications.\n\n-----\n\n# Requirements\n\n- [Docker 20.05 or higher](https://docs.docker.com/install/)\n- [Docker-Compose 1.29 or higher](https://docs.docker.com/compose/install/)\n- 4GB RAM (For Windows and MacOS make sure Docker's VM has more than 4GB+ memory.)\n\n# Setup\n\n1. Clone the Repository\n     ```bash\n     git clone https://github.com/lizozom/docker-elastic-observability-with-apm.git\n     ```\n2. Initialize Elasticsearch Keystore and TLS Self-Signed Certificates\n    ```bash\n    $ make setup\n    ```\n    \u003e **For Linux's docker hosts only**. By default virtual memory [is not enough](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html) so run the next command as root `sysctl -w vm.max_map_count=262144`\n3. Start Elastic Stack\n    ```bash\n    $ make elk           \u003cOR\u003e         $ docker-compose up -d\t\t\u003cOR\u003e\t\t$ docker compose up -d\n    ```\n4. Navigate to the web application at [http://localhost:3000/](http://localhost:3000) to generate APM traces.\n    ![image](https://user-images.githubusercontent.com/3016806/209701428-19a257ca-1b30-4f53-bb80-efd6434259d7.png)\n\n\n5. Visit Kibana at [https://localhost:5601/app/apm](https://localhost:5601/app/apm) to see the APM traces from our `webapp`\n\n    Default Username: `elastic`, Password: `changeme`\n    \n    ![image](https://user-images.githubusercontent.com/3016806/209701277-29e6ce0e-c068-4679-9a7a-ada6982d648e.png)\n\n# Configuration\n\n* Some Configuration are parameterized in the `.env` file.\n  * `ELASTIC_PASSWORD`, user `elastic`'s password (default: `changeme` _pls_).\n  * `ELK_VERSION` Elastic Stack Version (default: `8.3.2`)\n  * `ELASTICSEARCH_HEAP`, how much Elasticsearch allocate from memory (default: 1GB -good for development only-)\n  * Other configurations which their such as cluster name, and node name, etc.\n* Elasticsearch Configuration in `elasticsearch.yml` at `./elasticsearch/config`.\n* Kibana Configuration in `kibana.yml` at `./kibana/config`.\n\n### Setting Up Keystore\n\nYou can extend the Keystore generation script by adding keys to `./setup/keystore.sh` script. (e.g Add S3 Snapshot Repository Credentials)\n\nTo Re-generate Keystore:\n```\nmake keystore\n```\n\n### Notes\n\n- ⚠️ Elasticsearch HTTP layer is using SSL, thus mean you need to configure your elasticsearch clients with the `CA` in `secrets/certs/ca/ca.crt`, or configure client to ignore SSL Certificate Verification (e.g `--insecure` in `curl`).\n\n- Makefile is a wrapper around `Docker-Compose` commands, use `make help` to know every command.\n\n- Elasticsearch will save its data to a volume named `elasticsearch-data`\n\n- Elasticsearch Keystore (that contains passwords and credentials) and SSL Certificate are generated in the `./secrets` directory by the setup command.\n\n- Make sure to run `make setup` if you changed `ELASTIC_PASSWORD` and to restart the stack afterwards.\n\n- **Important**: For Linux Users it's recommended to set the following configuration (run as `root`)\n    ```\n    sysctl -w vm.max_map_count=262144\n    ```\n    By default, Virtual Memory [is not enough](https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html).\n\n# License\n[MIT License](https://raw.githubusercontent.com/sherifabdlnaby/elastdocker/master/LICENSE)\nCopyright (c) 2022 Sherif Abdel-Naby\n\n# Contribution\n\nPR(s) are Open and Welcomed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizozom%2Fdocker-elastic-observability-with-apm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flizozom%2Fdocker-elastic-observability-with-apm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flizozom%2Fdocker-elastic-observability-with-apm/lists"}