Previously working index failing to create


#1

Our production ELK stack suddenly stopped being able to create indexes for exceptions recently.
We're using the NEST C# library in the application, and events (purchases, site activity) are still able to create indexes, which is done with identical code (minus the index name and object being passed).

Elasticsearch logs say: http://pastebin.com/1XA2Kavb

I can't recreate the issue in my dev environment (logs everything just fine), which tells me the issue isn't in the application code (which I'll paste below anyway). I recently tried putting a template, which I believe is when the issue started, and attempts to clear it didn't seem to fix the issue. Ideally I'd be able to fix this without a restart, some googling tells me that may have to happen. Any ideas? I'm happy to provide any other information that would be helpful.

Here's the c# snippet:
var index = client.Index(elkception, i => i .Index("exceptions-" + DateTime.Now.ToString("yyyy-MM-dd")) .Type(elkception.TypeOfException) .Refresh() .Ttl("1m") );


(Adrien Grand) #2

There seems to be a problem with the date format that you are providing in your mappings. Can you provide us with your mappings?


#3

That's what the c# snippet was for. It just concatenates "exceptions-" with the date in yyyy-MM-dd format.
.Index("exceptions-" + DateTime.Now.ToString("yyyy-MM-dd"))

Unless I'm totally misunderstanding you


(Adrien Grand) #4

The issue seems to imply that there is a template that has a typo in some date format. Can you provide us with the output of curl -XGET localhost:9200/_template/?


#5

Hmm, well there is an exceptions-daily template that I thought I deleted, which may be the problem...

Here's the template (couldn't figure out how to get it to indent properly here): http://pastebin.com/HhjX9cUn

Would simply deleting this template solve my problem?


#6

Update: I tried deleting the template again and this time it seems to be working. Thanks for your help!


(system) #7