Skip to content

Metricbeat xpack monitoring cannot deal with trailing slash on the url #27798

Closed
@philippkahr

Description

Beats: 7.14.1
MacOS 11.5.2 and Windows 10.

Steps to reproduce:

  1. Start a cluster with docker
  2. Configure metricbeat to use the elasticsearch-xpack.yml module
  3. For hosts: ["http://localhost:9200"] change to hosts: ["http://localhost:9200/"] so it features a trailing /.
  4. Observe the 404 and 400 errors coming in.
2021-09-08T09:19:46.039+0200    INFO    module/wrapper.go:259   Error fetching data for metricset elasticsearch.shard: HTTP error 400 in : 400 Bad Request
2021-09-08T09:19:46.040+0200    INFO    module/wrapper.go:259   Error fetching data for metricset elasticsearch.cluster_stats: HTTP error 404 in : 404 Not Found
2021-09-08T09:19:46.047+0200    INFO    module/wrapper.go:259   Error fetching data for metricset elasticsearch.ml_job: HTTP error 400 in : 400 Bad Request
2021-09-08T09:19:46.047+0200    INFO    module/wrapper.go:259   Error fetching data for metricset elasticsearch.enrich: HTTP error 404 in : 404 Not Found

Steps to fix:

  1. Remove the trailing / slash
  2. See monitoring data coming in.

Expected behaviour:

  • Beats should deal with the trailing / or throw an error on startup that an invalid configuration was detected.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions