我正在尝试使用logstash来轮询Uber API(仅作为示例)以从API获取数据并且(此时)仅输出到控制台。似乎无法使自定义标头工作:
input {
http_poller {
urls => {
test2 => {
# Supports all options supported by ruby's Manticore HTTP client
method => get
url => "https://api.uber.com/v1/products?latitude=37.7759792&longitude=-122.41823"
headers => {
Authorization => "P8YegbF53nWPZST5xX0ZlktVnufXYYQa01Dy0ocm"
}
}
}
request_timeout => 60
interval => 60
codec => "json"
# A hash of request metadata info (timing, response headers, etc.) will be sent here
metadata_target => "http_poller_metadata"
}
}
output {
stdout {}
}
如果我理解这个概念,那应该是放置标题的地方,但由于它不是基本的auth,我不能在样本中使用Auth标志。