About the app key value store
The app key value store (or KV store) provides a way to save and retrieve data within your Splunk apps, thereby letting you manage and maintain the state of the application.
Here are some ways that Splunk apps might use the KV Store:
- Tracking workflow in an incident-review system that moves an issue from one user to another.
- Keeping a list of environment assets provided by users.
- Controlling a job queue.
- Managing a UI session by storing the user or application state as the user interacts with the app.
- Storing user metadata.
- Caching results from search queries by Splunk or an external data store.
- Storing checkpoint data for modular inputs.
For information on using the KV store, see app key value store documentation for Splunk app developers.
How KV store works with your deployment
The KV store stores your data as key-value pairs in collections. Here are the main concepts:
- Collections are the containers for your data, similar to a database table. Collections exist within the context of a given app.
- Records contain each entry of your data, similar to a row in a database table.
- Fields correspond to key names, similar to the columns in a database table. Fields contain the values of your data as a JSON file. Although it is not required, you can enforce data types (number, boolean, time, and string) for field values.
- _key is a reserved field that contains the unique ID for each record. If you don't explicitly specify the _key value, the app auto-generates one.
- _user is a reserved field that contains the user ID for each record. This field cannot be overridden.
- Accelerations improve search performance by making searches that contain accelerated fields return faster. Accelerations store a small portion of the collection's data set in an easy-to-traverse form.
The KV store files reside on search heads.
In a search head cluster, if any node receives a write, the KV store delegates the write to the KV store captain. The KV store keeps the reads local, however.
System requirements
KV store is available and supported on all Splunk Enterprise 64-bit builds. It is not available on 32-bit Splunk Enterprise builds. KV store is also not available on universal forwarders. See the Splunk Enterprise system requirements.
KV store uses port 8191 by default. You can change the port number in server.conf's [kvstore]
stanza. For information about other ports that Splunk Enterprise uses, see "System requirements and other deployment considerations for search head clusters" in the Distributed Search Manual.
For information about other configurations that you can change in KV store, see the "KV store configuration" section in server.conf.spec.
About Splunk FIPS
To use FIPS with KV store, see the "KV store configuration" section in server.conf.spec.
If Splunk FIPS is not enabled, those settings will be ignored.
If you enable FIPS but do not provide the required settings (caCertFile
, sslKeysPath
, and sslKeysPassword
), KV store does not run. Look for error messages in splunkd.log and on the console that executes splunk start
.
Determine whether your apps use KV store
KV store is enabled by default on Splunk Enterprise 6.2+.
Apps that use the KV store typically have collections.conf defined in $SPLUNK_HOME/etc/apps/<app name>/default
. In addition, transforms.conf will have references to the collections with external_type = kvstore
Use the KV store
To use the KV store:
- Create a collection and optionally define a list of fields with data types using configuration files or the REST API.
- Perform create-read-update-delete (CRUD) operations using search lookup commands and the Splunk REST API.
- Manage collections using the REST API.
Monitor the KV store on your Splunk Enterprise deployment
You can monitor your KV store performance through two views in the monitoring console. One view provides insight across your entire deployment. The other provides detailed information about KV store operations on each search head. See KV store dashboards in Monitoring Splunk Enterprise.
Disable the KV store
KV store is enabled by default. You can disable the KV store on indexers and forwarders, and on any installation that does not have any local apps or local lookups that use the KV store.
To disable the KV store, open the local server.conf file and edit the following stanza:
[kvstore] disabled=true
You can disable the KV store on an instance while it is running if you don't have any additional collections.conf files beyond the following list of default files:
- $SPLUNK_HOME/etc/system/default/collections.conf
- $SPLUNK_HOME/etc/apps/splunk_secure_gateway/default/collections.conf
- $SPLUNK_HOME/etc/apps/splunk_instrumentation/default/collections.conf
- $SPLUNK_HOME/etc/apps/python_upgrade_readiness_app/default/collections.conf
- $SPLUNK_HOME/etc/apps/splunk-dashboard-studio/default/collections.conf
- $SPLUNK_HOME/etc/apps/splunk-rolling-upgrade/default/collections.conf
Troubleshoot the license usage report view | Resync the KV store |
This documentation applies to the following versions of Splunk® Enterprise: 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.1.5, 9.1.6, 9.1.7, 9.2.0, 9.2.1, 9.2.2, 9.2.3, 9.2.4, 9.3.0, 9.3.1, 9.3.2, 9.4.0
Feedback submitted, thanks!