I'm going to monitor Docker Swarm containers using Metricbeat, which is itself a Swarm service. I've heard that I should use autodiscover instead of using modules directly.
Say I want to monitor services running uWSGI and PHP-FPM. Is it required to copy all contents of modules.d/uwsgi.yml and modules.d/php_fpm.yml in metricbeat.yml like below?
metricbeat.autodiscover:
providers:
- type: docker
templates:
- condition:
contains:
docker.container.image: my_python_app
config:
# Paste contents of uwsgi.yml here
- condition:
contains:
docker.container.image: my_php_app
config:
# Paste contents of php_fpm.yml here
But this seems to end in a large metricbeat.yml file. Is there a way to use separate config files with autodiscover, like when we used modules directly?