Describe the enhancement:
Currently we don't have username/password in autodiscover hints. In order to set this you need to make use of raw hint. Since these are really common configuration options we should consider adding them to the list of known hints.
Describe a specific use case for the enhancement or feature:
https://discuss.elastic.co/t/metricbeat-autodiscover-hints-for-mysql/211575/3
Implementation would be similar to #14208.
Manual Testing
- Enable autodiscover in metricbeat.yml
metricbeat:
autodiscover.providers:
- type: docker
hints.enabled: true
- Start metricbeat with log enabled:
./metricbeat -e -d "hints.builder"
docker run -l co.elastic.metrics/module=nats -l co.elastic.metrics/username=user42 --name nats nats
- Check in Metricbeat logs for :
2019-12-16T15:53:18.712+0200 DEBUG [hints.builder] hints/metrics.go:144 generated config: {"enabled":true,"hosts":null,"metricsets":["connections","routes","stats","subscriptions"],"module":"nats","period":"1m","processors":null,"ssl":null,"timeout":"3s","username":"user42"}
Describe the enhancement:
Currently we don't have username/password in autodiscover hints. In order to set this you need to make use of
rawhint. Since these are really common configuration options we should consider adding them to the list of known hints.Describe a specific use case for the enhancement or feature:
https://discuss.elastic.co/t/metricbeat-autodiscover-hints-for-mysql/211575/3
Implementation would be similar to #14208.
Manual Testing
./metricbeat -e -d "hints.builder"docker run -l co.elastic.metrics/module=nats -l co.elastic.metrics/username=user42 --name nats nats2019-12-16T15:53:18.712+0200 DEBUG [hints.builder] hints/metrics.go:144 generated config: {"enabled":true,"hosts":null,"metricsets":["connections","routes","stats","subscriptions"],"module":"nats","period":"1m","processors":null,"ssl":null,"timeout":"3s","username":"user42"}