Thanks for this post, saved my tracking :)

Em sexta-feira, 16 de julho de 2021 às 12:59:05 UTC-3, [email protected] 
escreveu:

> Hi 
>
> Could you please help with prometheus.yml example configuration for the 
> basic auth ?
>
> I tried with  your updated config in blackbox but NO LUCK.
>
> Thanks in advance.
>
> On Saturday, February 20, 2021 at 2:46:55 AM UTC+5:30 Kaufman Ng wrote:
>
>> Thanks Marcelo! Problem solved. I removed the host headers and it is 
>> working.
>>
>> Updated good config:
>>
>> modules:
>>   http_2xx:
>>     prober: http
>>     http:
>>       method: GET
>>       fail_if_not_ssl: true
>>       basic_auth:
>>         username: "username"
>>         password: "password"
>>
>>
>> On Friday, February 19, 2021 at 3:16:36 PM UTC-5 [email protected] 
>> wrote:
>>
>>> Wild guess:
>>>
>>> In the tls_config part you can optionally a ServerName setting. I'm 
>>> guessing that's what you are trying to do with the Host header.
>>>
>>> Does using that instead fix this?
>>>
>>> On Fri, Feb 19, 2021 at 1:47 PM Kaufman Ng <[email protected]> wrote:
>>>
>>>> I am trying to use the http module to hit a REST endpoint enabled with 
>>>> https and basic authentication. But I keep getting 401 status. I confirmed 
>>>> the username and password works via curl command.
>>>>
>>>> Anything wrong with my blackbox exporter config here? Thanks in advance!
>>>>
>>>> modules:
>>>>   http_2xx:
>>>>     prober: http
>>>>     http:
>>>>       method: GET
>>>>       valid_status_codes: [200,401]
>>>>       fail_if_not_ssl: true
>>>>       headers:
>>>>         Host: "my-endpoint"
>>>>       basic_auth:
>>>>         username: "user"
>>>>         password: "mypassword"
>>>>
>>>> -- 
>>>> 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/cd5d797d-71a7-46dd-a55a-91a2aca3ddfbn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/prometheus-users/cd5d797d-71a7-46dd-a55a-91a2aca3ddfbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>> -- 
>>> Marcelo Magallón
>>>
>>

-- 
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/d6ea3b5b-a87a-4763-894f-2ec3eda3bde9n%40googlegroups.com.

Reply via email to