Skip to content

Fix config stanza reading login in the splunkenv.py#430

Closed
echipachenko wants to merge 1 commit intosplunk:developfrom
echipachenko:develop
Closed

Fix config stanza reading login in the splunkenv.py#430
echipachenko wants to merge 1 commit intosplunk:developfrom
echipachenko:develop

Conversation

@echipachenko
Copy link
Copy Markdown
Contributor

Method get_conf_stanzas internally calls
$SPLUNK_HOME/bin/splunk cmd btool server list
This command leads to accumulated output. It reads server.conf files from all apps.
Such behaviour may lead to invalid results, if an app has different (not supported) format in the conf file.

I suggest to change login and read configs only from the system app:
$SPLUNK_HOME/bin/splunk cmd btool server list --app=system

@echipachenko echipachenko requested a review from a team as a code owner March 17, 2025 18:53
@hetangmodi-crest
Copy link
Copy Markdown
Contributor

Given the use case and fix, a rather non-breaking fix would be allowing developers to pass their custom scope when getting certain conf file details rather than hard-coding it to system. The default stays as is, and developers can have an option to pass the scope (the value for the --app parameter.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants