Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chatthana/elastic-stack-example
Elastic Stack (with Beat) Example Project
https://github.com/chatthana/elastic-stack-example
Last synced: 22 days ago
JSON representation
Elastic Stack (with Beat) Example Project
- Host: GitHub
- URL: https://github.com/chatthana/elastic-stack-example
- Owner: chatthana
- Created: 2022-08-11T02:23:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-11T08:41:07.000Z (over 2 years ago)
- Last Synced: 2023-03-11T21:48:47.405Z (almost 2 years ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elastic Stack on Docker
A experimential project on Elastic stack running on Docker (Compose). Also known as ELK or BELK (Beat + ELK)
## Overview
The projects uses ELK stack (Elasticsearch + Logstash + Kibana) to visualise logs shipped by Filebeat from the application.
It includes sample Node.js API project and Nginx. The Node.js API generates the log using winston in ECS (Elastic Common Schema) format
### How it works
Normally, Filebeat tails the files for new entries and send them to the destination (Elasticsearch or Logstash for example). Since this project is Docker based. The applications (in this case Nginx and Node.js API) are log sources.
They write the log internally but with bind mount feature of Docker, we can easily mount these paths to the local filesystem and share them between different containers. That's how Filebeat with dedicated containers come into play
> Kubernetes Compatibility
>
> The same concept (bind mount) can also be used in Kubernetes environment where containers within the same pod share local filesystem and network interface. We can deploy Filebeat container alongside base applications## Log Files
1. Node.js API - `/logs/service.log`
2. Nginx - `/var/log/nginx/access.log` and `/var/log/nginx/error.log`### Bind Mount Locations
1. Node.js logs - `apps/logs/node-api/`
2. Nginx - `apps/logs/nginx`See `docker-compose.yml` file for more details