Hello,

Basic auth can only be configured in the scrape configuration.

It is not possible to configure it in file_sd and it would expose the
secrets in the UI.

Le jeu. 4 févr. 2021 à 08:18, Ben Teitelbaum <b...@clostra.com> a écrit :

> I'm confused about how to configure HTTP basic auth through the file-based
> service discovery mechanism.  Relabeling works to set the scheme and
> metrics_path in the target URL, but not the username or password.
>
> This is what I expected would work in the config file JSON, but no luck:
>
> [
>   {
>     "targets":[
>       "foo.com:9100"
>     ],
>     "labels":{
>       "__scheme__":"https",
>       "__metrics_path__":"/metrics",
>       "__username__":"booyah",
>       "__password__":"topsecret",
>       "job":"bb395d48-a11a-4be9-9ace-a8f893db907c"
>     }
>   }
> ]
>
> How can this be made to work?
>
> -- ben
>
> --
> 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 prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/c827cb93-2d98-45b7-84eb-cce8eda7db20n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/c827cb93-2d98-45b7-84eb-cce8eda7db20n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAFJ6V0o7jSwOMqaLdQtUAp%3DhhXqeceK4S%2B6o10yz9VN2hU5FLw%40mail.gmail.com.

Reply via email to