Logstash not creating Index in Elasticsearch somedays
Hello,
I've just started using Logstash with Elasticsearch for an ELK stack.
Somedays (like today), Logstash won't create an index to push data in my Elasticsearch server.
Let's call Logstash 10.50 and Elasticsearch 10.1
If check indexes in 10.1, I can find logstash-2016.03.25 to 30 no problem, but I don't have anything for 31.
If I check the .log, it says
[2016-03-31 09:45:00,050][INFO ][rest.suppressed ] /logstash-2016.03.30,logstash-2016.03.31/_aliases Params: {index=logstash-2016.03.30,logstash-2016.03.31, ignore_missing=true, type=_aliases}
RemoteTransportException[[hdp3.xxxx][192.168.10.3:9300][indices:admin/get]]; nested: IndexNotFoundException[no such index];
Caused by: [logstash-2016.03.31] IndexNotFoundException[no such index]
So, I do have data pushed in but no index to store them. (a Tcpdump confirmed that).
What's the cause for not creating the index conveniently then ?
Thanks in advance
By default the elasticsearch output will use the event's current timestamp for generating the index name, Do you have any events associated with the 31?
Can you add your configuration to this issue?
Yes I do have data for the 31.
All my data are pushed into a Json, this json is always updated, if you tail it, you'll be able to see the change. It's on real time so of course I have data for 31 and 01/04
Then with logstash I have
input {
file {
path => ["/var/log/xxx/eve.json"]
codec => json
etc...
}
}
output {
if [type] == "xxx" {
elasticsearch {
host => "192.168.10.107"
protocol => http
}
elasticsearch {
host => "192.168.10.1"
protocol => http
}
}
}
As you can see I pushed into 2 elasticsearch cluster for testing purposes.
10.107 created my indices but 10.1 did not created index for neither 31 or today 01/04.
Not sure what kind of other configuration you may need.
I was having the same issue with logstash-2.1.1. After much futtzing around, it appears that the codec => json was causing me issues for some reason. Nothing in debug or info would say what the deal was.
Closing this issue since it has been open for a long time and we haven't received the details to debug it further. Please reopen a new issue if you still run into issues