# How can I set up autodiscovery for Dockerized mysql metrics and logs using Elastic Agent managed by Fleet?

**URL:** https://discuss.elastic.co/t/how-can-i-set-up-autodiscovery-for-dockerized-mysql-metrics-and-logs-using-elastic-agent-managed-by-fleet/317632
**Category:** Elastic Agent
**Tags:** filebeat, metricbeat
**Created:** [October 27, 2022, 5:14pm UTC](https://discuss.elastic.co/t/how-can-i-set-up-autodiscovery-for-dockerized-mysql-metrics-and-logs-using-elastic-agent-managed-by-fleet/317632 "2022-10-27T17:14:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jerrac](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jerrac/32/52980_2.png) [@jerrac](https://discuss.elastic.co/u/jerrac)
#### Post date: [October 27, 2022, 5:14pm UTC](https://discuss.elastic.co/t/how-can-i-set-up-autodiscovery-for-dockerized-mysql-metrics-and-logs-using-elastic-agent-managed-by-fleet/317632/1 "2022-10-27T17:14:08Z")

</div>

Judging from [Can I monitor apache inside a docker container?](https://discuss.elastic.co/t/can-i-monitor-apache-inside-a-docker-container/224859) and [Autodiscover | Metricbeat Reference [8.4] | Elastic](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-autodiscover.html) there should be a way to configure autodiscovery of my MySQL/MariaDB containers.

When I try adding a MySQL Metrics integration, though, I don't see any fields I could use for the autodiscover configuration.

Same story for Docker Metrics integration.

For logs, I'm sure I could use Custom Logs integrations just fine, but I'm pretty sure that adding Metricbeat autodiscovery config there wouldn't work... I believe the custom logs "custom configurations" field becomes part of Filebeat's config. So that wouldn't work for Metricbeat configuration.

My specific set up is a Docker Swarm with 3 managers, 3 workers, all on Ubuntu 22.04. Elastic Agent is installed directly on the vm's. It is NOT in a container. Agent is managed via Fleet in Kibana.

FYI, I'd also like to configure autodiscovery of Apache Status metrics.

Has anyone figured this out? Would you mind sharing?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 24, 2022, 5:14pm UTC](https://discuss.elastic.co/t/how-can-i-set-up-autodiscovery-for-dockerized-mysql-metrics-and-logs-using-elastic-agent-managed-by-fleet/317632/2 "2022-11-24T17:14:39Z")

</div>

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