Filebeat.yml correct configuration on MAC OS - docker autodiscover -- Docker daemon at unix:///var/run/docker.sock

Guys,

I am new to Docker. Am running Docker on my MAC. I've created on my docker-compose file this configuration:

    filebeat:
        depends_on:
          - kibana 
          - logstash
        container_name: filebeat 
        image: docker.elastic.co/beats/filebeat:${VERSION}
        volumes:
          - ./filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
          - /var/lib/docker/containers/:/var/lib/docker/containers/:ro
          - /var/run/docker.sock:/var/run/docker.sock:ro
        ports:
          - 8080:80
        networks:
          - elastic 

On my filebeat.yml I have this code:

    filebeat.autodiscover:
      providers:
        - type: docker
          hints.enabled: true
          labels.dedot: true


    output.logstash:
      hosts: logstash:5044

    logging.level: debug

What I am doing wrong?

The error is:

> filebeat | Exiting: error in autodiscover provider settings: error setting up docker autodiscover provider: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I solved my issue. Seems that you need to download the Docker from their site not to install it with homebrew. Also there is need to install virtualbox to run docker-machine ls.
With some digging seems that on MAC Docker is partially installed. Learned a lesson, but still, those kind of things have to be explain on their site for begginers.

There is a cask and bottle for docker. You need to install the cask for Docker Desktop. Even then, you will not have access /var/lib/docker as this is on the Linux VM that is needed to run the docker daemon. The socket is mounted into the VM from the host macOS so this should work.

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