Metricbeat autodiscover hints for MySQL

I'm looking for a way to setup auto-discovery based on docker hints for MySQL, as described here: https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-autodiscover-hints.html

How can I set the MySQL user and password supported by the module (https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-mysql.html), but using the labels instead? There are only a few labels supported as hints and I would like delegate to the configuration to the target, and not the metricbeat instance.

Thanks!

Hi @stingus,

how about using co.elastic.metrics/raw?

Seems that not all json keys/values are parsed from co.elastic.metrics/raw. Tried to set the user key but its value isn't passed to the module. So my guess is that only accepted keys are the ones listed on the hints based autodiscovery page.

Hey,

tried to reproduce it (with mongodb module) and I can see the username config to be set.

Could you check that your hints are correct. The key is username and not user just in case.

In any case we should consider adding username/password to known hints list. I will open a Github issue for this. Thanks for bringing this up!

Regards!

Fyi github issue: https://github.com/elastic/beats/issues/15115

Thanks @ChrsMark!

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