Hi there,
I'm working on metricbeats 6.3 to monitor several applications in docker containers where one of them contains the official elasticsearch docker image.
I'm using this syntax for docker:
metricbeat.modules:
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-docker.html
- module: docker
enabled: true
period: 10s
metricsets: ["container", "cpu", "diskio", "healthcheck", "info", "memory", "network"]
hosts: ["unix:///var/run/docker.sock"]
But I'm not sure how to do the elasticsearch monitoring - should that be with the docker metricbeat.autodiscover feature or the elasticsearch module. Also is the metricbeat.autodiscover redundant if I'm already using "metricbeat.modules: -docker"?
For elasticsearch:
#------------------------------- Docker Monitoring -------------------------------
metricbeat.autodiscover:
providers:
- type: docker
templates:
- condition:
contains:
docker.container.image: elasticsearch
config:
- module: elasticsearch
metricsets: ["node", "nodestats"]
hosts: "${data.host}:{data.port}"
or
#---------------------------- Elasticsearch Module ---------------------------
metricbeat.modules:
- module: elasticsearch
metricsets: ["node", "node_stats"]
period: 10s
hosts: ["localhost:9200"]
Thank you for any guidance!