我想从logstash调用剩余的api,并希望将其发送到弹性搜索以在kibana仪表板中显示数据。但是im gettig错误-
Uri
Powershell中的命令 logstash -f logstash_http_poller.conf
答案 0 :(得分:0)
您的elasticsearch
输出错误,您不需要主机周围的花括号:
elasticsearch {
hosts => "localhost:9200" <-- change this
index => "logstash_http_poller"
}
答案 1 :(得分:0)
input {
http_poller {
urls =>
{
test1 => "rest api url"
}
request_timeout => 60
# Supports "cron", "every", "at" and "in" schedules by rufus scheduler
schedule => { cron => "* * * * * UTC"}
codec => "json"
# A hash of request metadata info (timing, response headers, etc.) will be sent here
metadata_target => "http_poller_metadata"
}
}
output {
stdout {
codec => rubydebug
}
}