I used http_poller to call the SQL API of elasticsearch and got some statistics.
input {
http_poller {
urls => {
item => {
method => post
url => "http://localhost:9205/_sql?format=csv"
body => '{"query": "SELECT \u0027test\u0027 AS data_type, time, sum(count) AS count FROM test group by time"}'
headers => {
"content-type" => "application/json"
}
}
}
codec => "plain"
schedule => { cron => "*/2 * * * * *"}
}
}
It can get data
data_type,time,count
test,2021-08-10,1
test,2021-08-11,2
I want to match each line in the filter and save it to elasticsearch. My configuration is like this, but it doesn't work.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.