In nginx logs directory
docker run --rm -v `echo $( pwd )`:/var/log/nginx/ -e LOGSTASH_HOST='172.17.0.1' mishamx/filebeat-nginx:latest
or set full path
docker run --rm -v /var/log/nginx:/var/log/nginx/ -e LOGSTASH_HOST='172.17.0.1' mishamx/filebeat-nginx:latest
ENV | Default |
---|---|
LOGSTASH_HOST |
logstash |
LOGSTASH_PORT |
5044 |
INDEX_NAME |
nginx |
ENCODING |
utf-8 |
version: '3.3'
services:
filebeat_nginx:
image: filebeat-nginx:latest
volumes:
- /var/log/nginx:/var/log/nginx/
environment:
LOGSTASH_HOST: "172.17.0.1"
LOGSTASH_PORT: "5044"
INDEX_NAME: "nginx"
ENCODING: "utf-8"