Filebeat can't connect to Kibana(Docker)

All versions are 7.0.0

I've got an error when I'm trying to setup filebeat:
Loading dashboards (Kibana must be running and reachable) Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to http://localhost:5601/api/status fails: fail to execute the HTTP GET request: Get http://localhost:5601/api/status: dial tcp [::1]:5601: connect: cannot assign requested address. Response: .

Curl and kibana dashboard work just fine
curl http://localhost:5601/api/status {"name":"kibana","uuid":"685f72df-b68a-4de8-841f-0aaddba7a659","version":{"number":"7.0.0","build_hash":"ee89fda8a17eff9c93f7400c102edf76cb4d7d8a","build_number":23117,"build_snapshot":false},"status":{"overall":....

docker-compose.yml

  elasticsearch:
    build:
      context: docker/elasticsearch/
    env_file:
      - .env
    volumes:
      - ./docker/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
    ports:
      - "${ELASTIC_PORT}:${ELASTIC_PORT}"
    environment:
      ES_JAVA_OPTS: "-Xmx512m -Xms512m"
    networks:
      - elk

  logstash:
    build:
      context: docker/logstash/
    volumes:
      - ./docker/logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
      - ./docker/logstash/pipeline:/usr/share/logstash/pipeline:ro
    ports:
      - "${LOGSTASH_PORT}:${LOGSTASH_PORT}"
    environment:
      LS_JAVA_OPTS: "-Xmx512m -Xms512m"
    depends_on:
      - elasticsearch
    networks:
      - elk

  kibana:
    build:
      context: docker/kibana/
    env_file:
      - .env
    volumes:
      - ./docker/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro
    ports:
      - "${KIBANA_PORT}:${KIBANA_PORT}"
    environment:
      ELASTIC_URL: http://elasticsearch:${ELASTIC_PORT}
    depends_on:
      - elasticsearch
    networks:
      - elk

  filebeat:
    build: docker/filebeat/
    env_file:
      - .env
    environment:
      KIBANA_URL: http://kibana:${KIBANA_PORT}
      ELASTIC_URL: http://elasticsearch:${ELASTIC_PORT}
    volumes:
      - ./docker/filebeat/config/filebeat.yml:/usr/share/filebeat/config/filebeat.yml:ro
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/log/syslog:/var/log/syslog
    networks:
      - elk
    user: root
    depends_on:
      - elasticsearch
      - kibana
      - logstash:ro
          - /var/run/docker.sock:/var/run/docker.sock
          - /var/log/syslog:/var/log/syslog
        networks:
          - elk
        user: root
        depends_on:
          - elasticsearch
          - kibana
          - logstash

filebeat.yml

inputs:
  - type: log
    enabled: true
    paths:
      - /var/log/*.log
output.elasticsearch:
  hosts: ["${ELASTIC_URL}"]
  #username: "elastic"
  #password: "<password>"
setup.kibana:
  host: "${KIBANA_URL}"
modules:
  - module: system
    syslog:
      var.paths: ["/var/log/syslog*"]

Any ideas?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.