Google groups keeps deleting my responses, so I will try one more time. The answer is, you can't do this. Define the credentials statically in the job (as you did in your first example), replace static_configs with http_sd_configs, and set only the targets and auxiliary labels in your http endpoint.
Similar answer here: https://groups.google.com/g/prometheus-users/c/EbQ10HDRHso -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/4fe4d917-8758-4c17-bc72-4e5a459d4d1fn%40googlegroups.com.

