Co.elastic.metrics/raw to "simpler" format

Hey guys, i'm trying to convert this to a more "simpler" version for better Yaml anchoring reusage.

co.elastic.metrics/raw: >-
        "enabled": "true",
        "module": "http",
        "metricsets": [
        "headers": {"remote-user": "metricbeat"},
        "hosts": ["$${}:80"],
        "path": "/metrics?format=json",
        "method": "GET",
        "period": "10s",
        "namespace": "myproduct"

This is what I've got so far, but the remote-user header isn't sent to my service

co.elastic.metrics/hosts: "$${}:80"
co.elastic.metrics/module: http
co.elastic.metrics/metricsets: json
co.elastic.metrics/headers.remote-user: "metricbeat"
co.elastic.metrics/path: "/metrics?format=json"
co.elastic.metrics/method: "GET"
co.elastic.metrics/period: "10s"
co.elastic.metrics/namespace: "myproduct"

I'm pretty sure that it's only the headers section that isn't working, since there are logged.

Authentication by remote-user header could not be validated

What is the proper way to specify headers in metrics labels/annotations?

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