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"