I have two apps that are both utilizing the same exact type of custom .conf file. The data in the .conf files are supposed to be different (it's information like specific IP addresses) that the user can change. Inside these apps I have a few scripts that retrieve data from the conf file.
My problem is that a script within X app is getting the conf data from the one in Y app, even though X app should have it's own copy of the conf file in it's own app/local directory. The conf files have the same header because the scripts are the same for each app (but are different because of the configurable IP information). Giving each conf file unique headers fixes the issue but requires users to edit the scripts which isn't a viable option.
Is there any way I can get my splunk script to ONLY search for the one conf file in it's app/local directory and not search further?
Also, the line I'm using in my script to retrieve data is from the splunk.clilib library...
config = cli_common.getConfStanza('filename', 'thisconfstanza')
What you are encountering is the precedence of conf files.
There are a number of workarounds, but one potential is to put your conf in system/local, which has the highest precedence.
Or, deploy a app/TA with a name that takes precedence over your actual app(s).
---- An upvote would be appreciated and Accept Solution if it helps!