I'm using Fluentd to transfer the data into Elasticsearch.
td-agent.conf
## ElasticSearch
<match es.**>
type elasticsearch
target_index_key @target_index
logstash_format true
flush_interval 5s
</match>
Elasticsearch index :
"logstash-2016.02.24" : {
"aliases" : { },
"mappings" : {
"fluentd" : {
"dynamic" : "strict",
"properties" : {
"@timestamp" : {
"type" : "date",
"format" : "strict_date_optional_time||epoch_millis"
},
"dummy" : {
"type" : "string"
}
}
}
},
Transmit json data :
$ curl -X POST -d 'json={"@target_index": "logstash-2016.02.24","dummy":"test"}' http://localhost:8888/es.test
It should write the data to the given index instead of that It creates new index - logstash-2016.02.25 and it will write data into that. I want to write data to the given index.
Here is the Fluentd elasticsearch github link : https://github.com/uken/fluent-plugin-elasticsearch
Please correct me if I'm missing something.
type elasticsearch
should read@type elasticsearch
. – Stipe