Skip to content

removes date_pattern suffix to start using aliases

related to: https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9523

Elasticsearch support in the SemantincLogger is very limited. The only way in which you can configure ElasticsearchHttp appender is with an index prefix and a date pattern suffix. As per this documentation: https://www.rubydoc.info/gems/semantic_logger/SemanticLogger/Appender/ElasticsearchHttp it doesn't look like the date suffix can be adjusted. Unfortunately this means that indices will be exist on the ES cluster indefinitely (they will never be removed). In order to avoid that, we want to start using an index alias.

I'm actually not sure whether this change will work, the intention is to "hack" the Elasticsearch appender to use release_tools prefix and an empty ( `` ) date suffix. This will hopefully force the ES client to not create indices but instead always use release_tools index (which on the cluster is actually an alias and this allows us to delete old indices).

Signed-off-by: Michal Wasilewski mwasilewski@gitlab.com

Merge request reports