Reputation: 574
I am trying to push kafka data to Elasticsearch, I am trying to mention my elasticsearch index name as:
"name-date" -- logdata-2017.01.18
input {
kafka {
bootstrap_servers => "XXX.XX.XXX.XX:9092"
topics => ["c-data"]
}
}
output {
elasticsearch {
hosts => ["XXX.XXX.XX.XXX:9200"]
index => "logdata-%{+yyyy.MM.dd}"
}
}
But index is not getting created.
If I give any other index name without date format- for example
index => "metricbeat"
it works
but if I give with the configuration mentioned above it doesnt seem to work.
Can anyone help?
Upvotes: 1
Views: 7895
Reputation: 9434
What if you have your index name as follows:
index => "logdata-%{+YYYY.MM.dd}" <-- change the yyyy into uppercase
Upvotes: 2