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 TARGET] [--ignore-missing] [--in-place]
                    [--dry-run] [--banner BANNER]
                    conf [conf ...]

Positional Arguments

conf

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

Named Arguments

--target, -t

Destination file for merged configurations. If not provided, the merged conf is written to standard output.

--ignore-missing, -s

Silently ignore any missing CONF files.

--in-place, -i

Enable in-place update mode. When selected, the TARGET file will also be considered as the base of the merge operation. All CONF files will be merged with TARGET. When disabled, any existing content within TARGET is ignored and overwritten.

The --in-place option was added in v0.12.1. In earlier version of ksconf, and moving forward, this same behavior can be accomplished by simply listing the target twice. Once as in the --target option, and then a second time as the first CONF file.

--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.

Examples

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