ksconf merge

Merge two or more .conf files into a single combined .conf file. This is similar to the way that Splunk logically combines the default and local folders at runtime.

usage: ksconf merge [-h] [--target FILE] [--ignore-missing] [--dry-run]
                    [--banner BANNER]
                    FILE [FILE ...]

Positional Arguments

FILE The source configuration file(s) to collect settings from.

Named Arguments

--target, -t Save the merged configuration files to this target file. If not provided, the merged conf is written to standard output.
--ignore-missing, -s
 Silently ignore any missing CONF files.
--dry-run, -D Enable dry-run mode. Instead of writing to TARGET, preview changes in ‘diff’ format. If TARGET doesn’t exist, then show the merged file.
--banner, -b A banner or warning comment added to the top of the TARGET file. Used to discourage Splunk admins from editing an auto-generated file.


Here is an elementary example that merges all props.conf file from all of your technology addons into a single output file:

ksconf merge --target=all-ta-props.conf etc/apps/*TA*/{default,local}/props.conf

See an expanded version of this example here: Building an all-in one TA for your indexing tier