Previously working index failing to create


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:

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?


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/?


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):

Would simply deleting this template solve my problem?


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

(system) #7