-
Couldn't load subscription status.
- Fork 68
Description
I am trying to use filebeat to monitor docker container logs. But, am getting the following error with TLS way
This is how my filebeat.yml looks like -
filebeat.inputs:
- type: container
enabled: true
paths:
- '/var/lib/docker/containers//.log'
output.logstash:
enabled: true
hosts: ["logstash:5045"]
ssl.certificate_authorities: ["${CONFIG_DIR}/ca.crt"]
ssl.certificate: "${CONFIG_DIR}/filebeat.crt"
ssl.key: "${CONFIG_DIR}/filebeat.key"
In docker-compose.yml, for file beat service -
filebeat:
container_name: filebeat
hostname: filebeat
build:
context: filebeat/
args:
ELK_VERSION: $ELK_VERSION
restart: unless-stopped
command: >
sh -c "filebeat -e -strict.perms=false"
volumes:
- ./filebeat/config/filebeat.yml:${FILEBEAT_DIR}/filebeat.yml:ro
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
CONFIG_DIR: ${FILEBEAT_DIR}/config
LS_JAVA_OPTS: "-Xmx${FILEBEAT_HEAP} -Xms${FILEBEAT_HEAP}"
ELASTIC_USERNAME: ${ELASTIC_USERNAME}
ELASTIC_PASSWORD: ${ELASTIC_PASSWORD}
secrets:
- source: ca.crt
target: ${FILEBEAT_DIR}/config/ca.crt
- source: filebeat.cert
target: ${FILEBEAT_DIR}/config/filebeat.crt
- source: filebeat.key
target: ${FILEBEAT_DIR}/config/filebeat.key
user: root
ports:
- "9000:9000"
networks:
- elk
depends_on:
- logstash
pipeline/output.go:154 Failed to connect to backoff(async(tcp://logstash:5045)): dial tcp 172.22.0.4:5045: connect: connection refused
I am stuck with this issue for past 3days and couldn't find a solution. Hope you can help here