Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working for docker container logs #24

Open
SathishSuresh-opex opened this issue Jan 15, 2022 · 0 comments
Open

not working for docker container logs #24

SathishSuresh-opex opened this issue Jan 15, 2022 · 0 comments

Comments

@SathishSuresh-opex
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant