donvito / melvinvivas.com

Blog posts from my website
https://www.melvinvivas.com
MIT License
0 stars 0 forks source link

docker-elasticsearch-fluentd-nginx/ #8

Open utterances-bot opened 5 years ago

utterances-bot commented 5 years ago

Ingest NGINX container access logs to ElasticSearch using Fluentd and Docker

undefined

http://localhost:2368/docker-elasticsearch-fluentd-nginx/

hassanfarid commented 5 years ago

Thanks Melvin. This is helpful, and source code as well.

I have following question,

The question is related to dependency of nginx on fluentd presence, and nginx will fail and throw exception.

donvito commented 5 years ago

Hi, when fluentd is down, logs will not be sent to ElasticSearch. The nginx access logs will just be inside the nginx container as files or if you mount it in a docker volume then the log files will be persistent.

This configuration below is optional so feel free to remove it. I just used it when doing the example to make sure nginx starts when fluentd is already up.

depends_on:

hassanfarid commented 5 years ago

Hey- I don't think nginx will be able to start because of docker-driver binding with fluentd.