elastic / elastic/beats

[Chore] IndexPrefix option in libbeat settings is never used by any beat type

Open
#50,147 2 comments 0 reactions 0 assignees View on GitHub
Team:Elastic-Agent-Data-Plane
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 15m
Merged PRs (30d)
385

Description

[IndexPrefix](https://github.com/khushijain21/beats/blob/logstash-metadata/libbeat/cmd/instance/settings.go#L33) setting is never used by any beat. Instead we always fall back to default value here - which is the same as the name of the beat [here](https://github.com/khushijain21/beats/blob/logstash-metadata/libbeat/cmd/instance/beat.go#L223-L225)

I think its a good idea to simplify this by removing IndexPrefix.

Had to go down a rabbit hole only to find out IndexPrefix and beatname are always exactly the same

Contributor guide

Open the contributing guide

Research direction

Start by reading IndexPrefix in libbeat/cmd/instance/settings.go and the defaulting logic in libbeat/cmd/instance/beat.go around the linked lines. Search the Beats repository for other references, then inspect the relevant libbeat tests; done means the unused setting is removed without changing the effective beat-name index behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.