Splunk configuration files are critical for controlling the behavior of your Splunk environment. These files determine how data is collected, forwarded, parsed, and stored. This guide explains key configuration files, how they work, and how to validate and troubleshoot them.
Splunk uses multiple configuration files, each serving a specific purpose. Let’s explore the most important ones in detail.
inputs.confPurpose:
Key Fields:
monitor: Monitors a file or directory for changes.tcp/udp: Configures Splunk to listen for data on specific network ports.script: Executes scripts that generate data.Example Configurations:
File Monitoring:
[monitor:///var/log/syslog]
disabled = false
index = main
sourcetype = syslog
Network Input (Syslog):
[udp://514]
disabled = false
index = syslog_index
sourcetype = syslog
Script Input:
[script://./bin/myscript.sh]
disabled = false
index = custom_index
sourcetype = custom_script
outputs.confPurpose:
Key Fields:
tcpout: Defines the destination Indexers.group: Organizes multiple Indexers for load balancing.Example Configurations:
Single Indexer:
[tcpout]
defaultGroup = default-autolb-group
[tcpout:default-autolb-group]
server = 192.168.1.10:9997
Multiple Indexers with Load Balancing:
[tcpout]
defaultGroup = indexer_group
[tcpout:indexer_group]
server = 192.168.1.10:9997,192.168.1.11:9997
autoLB = true
props.confPurpose:
Key Fields:
TIME_FORMAT: Specifies the timestamp format in the data.BREAK_ONLY_BEFORE: Splits events based on specific patterns.REPORT: Refers to field extraction rules in transforms.conf.Example Configurations:
Timestamp Recognition:
[apache_access]
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
MAX_TIMESTAMP_LOOKAHEAD = 32
Event Breaking:
[multiline_events]
SHOULD_LINEMERGE = true
BREAK_ONLY_BEFORE = ^\d{4}-\d{2}-\d{2}
Field Extraction:
[custom_logs]
REPORT-fields = extract_custom_fields
transforms.confPurpose:
Key Fields:
REGEX: Specifies the pattern to match.FORMAT: Defines the transformation or destination.DEST_KEY: Specifies where the transformation applies.Example Configurations:
Masking Sensitive Data:
[mask_ssn]
REGEX = \b\d{3}-\d{2}-\d{4}\b
FORMAT = XXX-XX-XXXX
DEST_KEY = _raw
Event Routing:
[route_to_null]
REGEX = .*debug.*
DEST_KEY = queue
FORMAT = nullQueue
Understanding how Splunk applies configuration settings is essential for troubleshooting and customizing behavior.
$SPLUNK_HOME/etc/users/.$SPLUNK_HOME/etc/apps/.$SPLUNK_HOME/etc/system/.Local Configurations:
local directory of an app override those in the default directory.$SPLUNK_HOME/etc/apps/<app_name>/local/props.conf takes precedence over $SPLUNK_HOME/etc/apps/<app_name>/default/props.conf.Global vs. App-Specific Settings:
Validating and debugging configuration files ensures your changes are applied correctly and avoid errors.
btool CommandPurpose:
Syntax:
splunk cmd btool <config_file> list --debug
Examples:
List all active inputs:
splunk cmd btool inputs list --debug
Debug props.conf settings for a specific sourcetype:
splunk cmd btool props list apache_access --debug
inputs.conf to ensure the data source is enabled.props.conf and transforms.conf for parsing rules.outputs.conf for the correct destination Indexers.inputs.confLet’s start by configuring inputs.conf for various data inputs.
Scenario: You want to monitor all log files in /var/log/app/.
Configuration:
[monitor:///var/log/app/]
disabled = false
index = app_logs
sourcetype = app_log
recursive = true
Explanation:
monitor: Specifies the directory path.disabled = false: Ensures the input is active.index = app_logs: Data is sent to the app_logs index.recursive = true: Includes files in subdirectories.Scenario: Your system needs to collect logs from a remote server via TCP on port 10514.
Configuration:
[tcp://10514]
disabled = false
index = network_logs
sourcetype = tcp_data
Explanation:
tcp://10514: Configures Splunk to listen on port 10514.sourcetype = tcp_data: Ensures proper parsing of incoming logs.outputs.confNow, let’s configure data forwarding to Indexers.
Scenario: Forward data to an Indexer at 192.168.1.10.
Configuration:
[tcpout]
defaultGroup = single_indexer_group
[tcpout:single_indexer_group]
server = 192.168.1.10:9997
Scenario: Use multiple Indexers for load balancing.
Configuration:
[tcpout]
defaultGroup = indexer_group
[tcpout:indexer_group]
server = 192.168.1.10:9997,192.168.1.11:9997
autoLB = true
Explanation:
autoLB = true: Enables load balancing across Indexers.props.conf and transforms.confParsing and transforming data is an essential part of Splunk’s ingestion process.
Scenario: Parse Apache access logs and extract fields like IP address, HTTP method, and status code.
props.conf:
[apache_access]
TIME_FORMAT = %d/%b/%Y:%H:%M:%S %z
MAX_TIMESTAMP_LOOKAHEAD = 32
REPORT-apache_fields = extract_apache_fields
transforms.conf:
[extract_apache_fields]
REGEX = ^(?P<client_ip>\d+\.\d+\.\d+\.\d+) - - \[(?P<timestamp>[^\]]+)\] "(?P<method>\w+) (?P<uri>[^\s]+) HTTP/\d\.\d" (?P<status>\d+)
FORMAT = client_ip::$1 timestamp::$2 method::$3 uri::$4 status::$5
Explanation:
transforms.conf.Scenario: Mask Social Security Numbers (SSNs) in logs.
props.conf:
[source::/var/log/app_logs]
TRANSFORMS-mask = mask_ssn
transforms.conf:
[mask_ssn]
REGEX = (\d{3}-\d{2}-\d{4})
FORMAT = XXX-XX-XXXX
DEST_KEY = _raw
Explanation:
DEST_KEY = _raw: Rewrites the raw event data, replacing SSNs with masked values.btoolUse btool to validate and troubleshoot configurations.
Command:
splunk cmd btool props list apache_access --debug
Output:
props.conf settings for the apache_access sourcetype.Cause:
inputs.conf.Solution:
Verify the data source path:
splunk cmd btool inputs list --debug
Ensure the input is not disabled (disabled = false).
Cause:
props.conf or transforms.conf.Solution:
Test the extraction rule using the Field Extractor tool in Splunk Web.
Validate props.conf settings:
splunk cmd btool props list sourcetype_name --debug
Cause:
outputs.conf or network connectivity issues.Solution:
Check Forwarder’s connection to the Indexer:
splunk list forward-server
Verify outputs.conf for correct Indexer details.
Route events to specific indexes based on their source.
props.conf:
[source::/var/log/app_logs]
TRANSFORMS-routing = route_to_index
transforms.conf:
[route_to_index]
REGEX = .*error.*
DEST_KEY = _MetaData:Index
FORMAT = error_logs
Explanation:
error are routed to the error_logs index.Create alternative names for fields to simplify queries.
props.conf:
[apache_access]
FIELDALIAS-uri_path = uri AS path
Explanation:
uri is accessible as path in searches.$SPLUNK_HOME/etc/apps/<app_name>.local directory for custom changes.Add comments to explain configurations:
# This input monitors Apache logs
[monitor:///var/log/apache]
Splunk relies heavily on configuration files (conf files) to define system behavior, from data ingestion to search-time processing. This section focuses on fields.conf, limits.conf, configuration reload behaviors, common syntax mistakes, and centralized management via the Deployment Server.
fields.conf – Field Behavior ConfigurationThe fields.conf file defines how fields behave after extraction, especially during search-time and display.
Control whether a field:
Is searchable
Is indexed
Supports multi-value behavior
Is case-sensitive or case-insensitive
[custom_field]
INDEXED = false
SEARCHABLE = true
INDEXED = false: Field is not indexed, reducing disk usage.
SEARCHABLE = true: Field is available for search-time filtering and display.
System-wide:
$SPLUNK_HOME/etc/system/local/fields.conf
App-specific:
$SPLUNK_HOME/etc/apps/<app_name>/local/fields.conf
limits.conf – System Limits and Resource TuningThe limits.conf file is used to define performance thresholds and ingestion-related system limits.
| Parameter | Description |
|---|---|
maxKBps |
Limits indexer throughput (in kilobytes per second) |
event_breaker |
Defines event boundary behavior for certain inputs |
maxDistEvents |
Controls line distance for multiline event correlation |
max_event_size |
Specifies the maximum size for a single event (in bytes) |
[thruput]
maxKBps = 5120
This caps indexer throughput at 5MB/sec.
Default or custom tuning:
$SPLUNK_HOME/etc/system/local/limits.conf
Understanding which configuration files require a full Splunk restart vs those that support hot reload is crucial for minimizing downtime.
| Config File Type | Hot Reload Supported | Notes |
|---|---|---|
inputs.conf |
No | Requires splunk restart to monitor new inputs |
outputs.conf |
Partial | May reload via CLI but restart is safer |
props.conf, transforms.conf |
Yes | Supports reload for field extraction and masking rules |
indexes.conf |
No | Must restart to apply changes |
splunk _internal call /services/data/inputs/monitor/_reload
Or restart:
splunk restart
Use:
splunk apply cluster-bundle
Applies updated configs to all peer nodes in an indexer cluster
Does not restart Splunk entirely but may restart indexing pipelines
Misconfigured .conf files are a frequent cause of Splunk issues. Knowing common mistakes and how to debug them is essential.
Misspelled keys (e.g., disable = true instead of disabled = true)
Missing equals signs (=) between key and value
Placing the stanza header in the wrong section
Improper indentation or inconsistent formatting (INI format is forgiving, but consistency is advised)
btoolSplunk provides the btool command to inspect final configuration values and detect overrides or misplacement.
splunk cmd btool props list --debug
splunk cmd btool transforms list --debug
splunk cmd btool indexes list --debug
Use --debug to view the full path and file source of each parameter.
Helpful to detect if settings are read from default/ or overridden in local/.
Always place changes in local/, not default/.
Remember to restart Splunk if you're changing files like inputs.conf or indexes.conf.
Use the _internal index to trace config application errors.
A Deployment Server (DS) is used to manage and push configuration files to a large fleet of Forwarders, such as Universal Forwarders on endpoints or Heavy Forwarders in DMZs.
| File | Purpose |
|---|---|
deploymentclient.conf |
Configures the client (Forwarder) to connect to the DS |
serverclass.conf |
Defines which apps/configs are delivered to which clients |
Deploy consistent inputs.conf across all forwarders
Update outputs.conf for indexer destinations
Distribute props.conf and transforms.conf rules for parsing at the edge
You have 300 forwarders and want them all to monitor /var/log/app/.
TA-app_logs) with inputs.conf:[monitor:///var/log/app/]
index = app_index
sourcetype = app_logs
serverclass.conf:[serverClass:AppLogs]
whitelist.0 = *
app.0 = TA-app_logs
Organize forwarders into logical groups (server classes)
Use the Deployment Monitor app to track deployment status
Avoid pushing large apps too frequently; consider versioning
In Splunk configuration precedence, which directory typically has the highest priority for configuration settings?
$SPLUNK_HOME/etc/apps/<app_name>/local.
Splunk configuration precedence determines which settings take effect when the same parameter appears in multiple configuration files. In most cases, settings located in the local directory of an app override those found in the default directory. This design allows administrators to customize application behavior without modifying vendor-provided default configurations. For example, an app’s default configuration may define certain parameters in default/, while administrators can override them in local/. Modifying the default directory is discouraged because upgrades may overwrite those files. Therefore, best practice is to place all custom configurations in the local directory of the relevant app.
Demand Score: 90
Exam Relevance Score: 94
What is the purpose of the default directory within a Splunk app?
It stores the app’s default configuration settings.
The default directory within a Splunk app contains the baseline configuration provided by the app developer or Splunk installation. These configuration files define the initial behavior of the app, including settings for inputs, indexes, search configurations, and other components. Administrators typically do not modify files in the default directory because updates or upgrades may overwrite them. Instead, customizations should be placed in the local directory, which overrides the settings in default. This separation ensures that custom configurations remain intact when apps are upgraded.
Demand Score: 84
Exam Relevance Score: 91
Which command-line tool can administrators use to inspect the effective configuration settings applied in Splunk?
btool.
The btool command-line utility allows administrators to examine the merged configuration settings that Splunk applies after processing all configuration layers. Because settings can exist in multiple files across various directories, it may be difficult to determine which configuration actually takes precedence. The btool command displays the final effective configuration and shows the file paths where each setting originates. This capability is especially useful when troubleshooting configuration conflicts or verifying that a particular configuration override is being applied correctly. Administrators often run splunk btool <conf-file> list --debug to display detailed results.
Demand Score: 82
Exam Relevance Score: 93
Which configuration layer takes precedence: an app’s default directory or the system local directory?
The system local directory takes precedence.
Splunk applies configuration settings according to a defined precedence hierarchy. Although app-level configurations can override their own default settings, system-level configurations generally have higher priority. The system/local directory is typically the highest precedence location and overrides settings defined in app directories. This allows administrators to enforce global configurations across all apps and services. However, excessive use of system/local can make troubleshooting more complex because overrides apply to the entire Splunk instance rather than a single app.
Demand Score: 80
Exam Relevance Score: 92
Why is the --debug option commonly used with the btool command?
To display the source file path for each configuration setting.
When running the btool command with the --debug flag, Splunk outputs not only the final configuration value but also the exact file location where that value originates. This is particularly helpful when troubleshooting complex environments where multiple apps and directories contain overlapping configuration parameters. By examining the file path provided by --debug, administrators can quickly identify which configuration file is overriding others. Without the debug option, btool only displays the merged configuration values, which may not reveal the source of the applied setting.
Demand Score: 79
Exam Relevance Score: 90