Quite late to respond but based on the document, you need to add the bearer token [using the http_config][1]
- job_name: 'test'
metrics_path: "/metrics"
scheme: "http"
authorization:
type: Bearer
credentials: <your-secret>
credentials_file: <file-location-of-your-secret>
static_configs:
- targets: ['host.com']
Either credentials
or credentials_file
should be provided.
[1]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_config