Can not collector docker container event

i wannt collector docker container application heartbeat , but it does not work, that is my config

heartbeat.autodiscover:
  providers:
    - type: docker
      templates:
          config:
            - type: http
              hosts: ["${data.host}:${data.port}"]
              schedule: "@every 1s"
              timeout: 1s
processors:
  - add_cloud_metadata:
  - add_docker_metadata:
  - add_host_metadata:
output.elasticsearch:
  hosts: ["http://ip:9200"]
  username: "username"
  password: "changeme"
setup.kibana:
  host: "http://kibana:5601"
monitoring:
  enabled: true
  elasticsearch:
    hosts: ["http://es:9200"]
    username: beat
    password: ps

docker-compose.yml

version: '2'
services:
  filebeat:
    user: root
    image: registry-vpc.cn-hangzhou.aliyuncs.com/elasticstack/heartbeat:7.3.0
    volumes:
      - "./heartbeat.yml:/usr/share/heartbeat/heartbeat.yml"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

You should generally not add the three processors you've added to heartbeat, they add info about the machine heartbeat is being run on, not what it's auto-discovering.

Are there any logs or other info that point to a problem? What's the output?

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