Hi,
I am using env variables in filebeat.yml, it is failing to parse the variables.
filebeat.yml
output.elasticsearch:
hosts: [$ELASTICSEARCH_HOST]
template:
name: "filebeat"
path: "fields.yml"
overwrite: false
protocol: "http"
docker-compose.yml
version: "3.5"
services:
filebeat:
build:
context: ./filebeat
args:
ELK_VERSION: $ELK_VERSION
volumes:
- "/var/lib/docker/containers:/usr/share/dockerlogs/data:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
default:
name: filebeat-nw
external: true
I am running the container as a service with the command "docker-compose up --build"
Could you please help me to understand how to use env variables in filebeat.yml file.
Thank You.