Resolving template conflicts and adjusting prefix in own ES instance

Original Slack Thread

Hi team, I am trying to use own ES instance. Now that instance has already few templates added. I am having conflict beacuse of same priority of templates and overlapping patterns. So for datahub we have datahub_usage_event that is pattern. prefix is * right so it can be any word so in general what are the possible words which comes as prefix and having middle word as datahub_usage_event? Or is there any way to check that?

<@UV5UEC3LN> might be able to speak to this! This is the code that sets up the prefix for the template. It depends on if you’ve set up an index prefix for the elasticSearch setup job which depends on how you’ve deployed

Hi, I am currently not using any prefix but still it is like prefixdatahub_usage_event so if I add some prefix then also there is * ahead so again that will match with other templates like some_word* so what if I move prefix before * like this prefixdatahub_usage_event ? How this will affect overall es and datahub and is it okay to do even?

I’m not sure exactly what you’re asking, but making the template more explicit for your particular environment so it doesn’t match your other indices should be okay, I don’t think it will cause issues. The ES-Setup job might overwrite it if it runs again though.