I think I've set it up in blackbox?
http_2xx_estate:
prober: http
timeout: 5s
http:
method: post
headers:
key: abc
data: 123
Content-Type: application/json;charset=UTF-8
body: '{}'
在 2020年5月12日星期二 UTC+8下午6:36:58,Brian Candler写道:
>
> On Tuesday, 12 May 2020 11:17:33 UTC+1, 李毅 wrote:
>>
>> Use curl with parameters to return status code 200, use blackbox to
>> return 400, why?
>>
>
> What you've done in your curl command is to post JSON containing "key" and
> "data". What you've done in blackbox exporter is to post an empty JSON
> object {}, and to add HTTP headers "key" and "data".
>
> Try the curl command which does the same:
>
> curl -iv -H "Content-Type:application/json;charset=UTF-8" -H "key:abc" -H
> "data:123" -X POST -d '{}' https://xx.com/xxl/get/xxx
>
>
>
>
--
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/d648b948-353b-4ff3-ae6f-9a6306a01362%40googlegroups.com.