Add rake task to enable the elasticsearch slow log

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Background

Slowlog is currently enabled manually using change requests. This doesn't scale and the team needs to automate this.

Proposal

  • Add a new rake task (see elastic rake tasks and Search::Elastic::RakeTaskExecutor service) to enable the slowlog for all indices. The task should:
    • return early if the slowlog is enabled already
    • allow indices to be chosen (so only some could have it enabled)
    • enable the slowlog with a specific setting on each index
    • support both Elasticsearch and OpenSearch, research if there are differences in enable slowlog on both
  • Add specs for the task
  • Add task to advanced search admin docs
Edited by 🤖 GitLab Bot 🤖