Skip to content

Add username/password in Metricbeat autodiscover hints #15115

@ChrsMark

Description

@ChrsMark

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

  1. Enable autodiscover in metricbeat.yml
metricbeat:
  autodiscover.providers:
    - type: docker
      hints.enabled: true
  1. Start metricbeat with log enabled: ./metricbeat -e -d "hints.builder"
  2. docker run -l co.elastic.metrics/module=nats -l co.elastic.metrics/username=user42 --name nats nats
  3. 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"}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions