I want to ingest data to logstash with following command:
curl -XPUT 'mylogstashurl.com' -d 'hello'
I get this data into logstash but unfortunjately the @metadata field is always empty.
Is there any header i need to pass so I can override the metadata field?
As you can see I am saving the data to follwing index => "%{[@metadata]}-%{+YYYY.MM.dd}". Meaning with this command curl -XPUT 'mylogstashurl.com' -d 'hello', the Index where the data gets written to is always is something like this [{}-2019.05.21].
When data is send to logstash via Beats it works totally fine with the index name.
This should output the document to stdout, and you'll see what's contained in the @metadata fields. Most likely, your @metadata doesn't get populated the way you expect it to, when using the http input - resulting in an unexpected elasticsearch index name.
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.