# Sets the `Authorization` header on every scrape request with the
# configured username and password.
# password and password_file are mutually exclusive.
basic_auth:
[ username: <string> ]
[ password: <secret> ]
[ password_file: <string> ]On 13 Aug 06:56, Justin Thomas wrote:
> The prometheus docs have the below:
>
> # Sets the `Authorization` header on every scrape request with the
> # configured username and password.
> # password and password_file are mutually exclusive.
> basic_auth:
> [ username: <string> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#string> ]
> [ password: <secret> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#secret> ]
> [ password_file: <string> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#string> ]
>
>
> What is the format of password_file? I know you can create a file with
> htpasswd, but that has the hashed version of the password so would assume
> that isn't what the scrape config needs to make a request to a /metrics
> with basic auth. Any examples around?
The file must just contain the password in plaintext.
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.