Unverified Commit 6a0cde7e authored by micah's avatar micah
Browse files

Add JWT bearer_token option to prometheus_external_targets.

parent 826883b1
Pipeline #19090 passed with stages
in 4 minutes and 54 seconds
......@@ -2424,7 +2424,8 @@ Prometheus instances should scrape the primary ones (default 1m).
beyond those that are described by the service metadata. It is a list of entries
with *name*, *targets* attributes. Optionally, you may specify a *scheme*
(eg. 'https') if the default 'http' is insufficient; as well as *basic_auth*
details; or *tls_config* options, if necessary. For example:
details; JSON Web Token (JWT) as a *bearer_token*; or *tls_config* options, if
necessary. For example:
```yaml
- { name: 'node-external',
......@@ -2435,6 +2436,12 @@ details; or *tls_config* options, if necessary. For example:
basic_auth: { username: foo, password: bar },
tls_config: { insecure_skip_verify: true }
}
- { name: 'minio,
targets: [ 'objects.example.com:9000' ],
scheme: 'https',
bearer_token: 'xxxxxxx',
metrics_path: '/minio/v2/metrics/cluster'
}
```
`prometheus_federated_targets` is a list of external Prometheus
......
......@@ -243,6 +243,9 @@ scrape_configs:
{% if target.basic_auth|default([]) %}
basic_auth: {{ target.basic_auth | to_json }}
{% endif %}
{% if target.bearer_token|default([]) %}
bearer_token: {{ target.bearer_token | to_json }}
{% endif %}
{% if target.tls_config|default([]) %}
tls_config: {{ target.tls_config | to_json }}
{% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment