the docker-compose content:
version: '2.1' services: fix_elasticsearch_permissions: user: root image: alpine command: chown -R 1000:1000 /usr/share/elasticsearch/data volumes: - ./app/elk/elasticsearch/data:/usr/share/elasticsearch/data elasticsearch: build: context: ELK/elasticsearch/ args: ELK_VERSION: 6.4.2 volumes: - ./app/elk/elasticsearch/data:/usr/share/elasticsearch/data ports: - "9200:9200" - "9300:9300" environment: ES_JAVA_OPTS: "-Xmx256m -Xms256m" logstash: build: context: ELK/logstash/ args: ELK_VERSION: 6.4.2 ports: - "5000:5000" - "5000:5000/udp" - "9600:9600" environment: LS_JAVA_OPTS: "-Xmx256m -Xms256m" depends_on: - elasticsearch kibana: build: context: ELK/kibana/ args: ELK_VERSION: 6.4.2 ports: - "5601:5601" depends_on: - elasticsearch
Where to find the ELK stack ?
The ELK folder can be find in the webuxjs repo webuxjs
What it does ?
it will deploy the ELK stack, you will be able to push the log using the port 5000 in tcp or udp mode.
You will be also able to access the kibana dashboard directly from your browser. You have to connect to
once everything is setup. you can configure your backend to communicate with that stack.
you have to open the file
config/logger.js, under the logstash object, you can set the host to the appropriate one.
After that you can start your server and the logger will be automatically redirected to the logstash instance.
The second method to configure the backend, is to use the environment variables.
- LOGSTASH_URL -> where is your logstash server, DNS or IP
- APP_ID -> The label to identify your instance
- CONSOLE -> if you want to redirect the output also on the console
these three variables are associated with the logger options.