Splunk Search

After migrating CSV lookups to kvstore, why does the lookup command no longer output results in a search?

spyme72
Path Finder

i am currently migrating all the csv to kvstore.
when i do an inputlookup or outputlookup, it works perfectly fine and returns the results.
but when i use the lookup in my search it doesn't do the lookup. The same search works fine when i use .csv.

This search works

index=perfmon counter="% Processor Time" | lookup windowsperfmon.csv counter OUTPUT playbook | table counter playbook

counter playbook
% Processor Time Page Windows Server Support
% Processor Time Page Windows Server Support
% Processor Time Page Windows Server Support

This doesn't work

index=perfmon counter="% Processor Time" | lookup windowsperfmon counter OUTPUT playbook | table counter playbook

counter playbook
% Processor Time

% Processor Time

% Processor Time

% Processor Time

collections.conf

[windowsperfmon]
enforceTypes = true
field.xxx = string
field.yyy = string
field.zzz = string
field.status = string
field.email = string
field.object = string
field.counter = string
field.instance = string
field.trigger = string
field.threshold = number
field.severity = string
field.time_freq = string
field.occurrence = number
field.playbook = string

Transforms.conf

[windowsperfmon]
external_type = kvstore
collection = windowsperfmon
fields_list = _key,xxx,yyy,zzz,status,email,object,counter,instance,trigger,threshold,severity,time_freq,occurrence,playbook
case_sensitive_match = false
1 Solution

jacobwilkins
Communicator

Ha! I know this one!

You have case_sensitive_match = false and there is a bug in splunk, SPL-102111, regarding that setting and kvstore lookups.

FWIW, the kvstore is perfect for "lookups" that you use in the context of inputlookup only, things like populating searches for dropdowns, and maybe seeds for subsearches.

Moving your regular lookups to the kvstore could potentially destroy your performance, if you are distributing to a significant number of peers. CSV lookups are cool because they distribute (via the search bundle) out to each peer, so the lookups are performed in a distributed manner. The kvstore only lives on your SH, so it is like setting "local=true" on your lookup command. Bad mojo for bigger deployments.

View solution in original post

jacobwilkins
Communicator

Ha! I know this one!

You have case_sensitive_match = false and there is a bug in splunk, SPL-102111, regarding that setting and kvstore lookups.

FWIW, the kvstore is perfect for "lookups" that you use in the context of inputlookup only, things like populating searches for dropdowns, and maybe seeds for subsearches.

Moving your regular lookups to the kvstore could potentially destroy your performance, if you are distributing to a significant number of peers. CSV lookups are cool because they distribute (via the search bundle) out to each peer, so the lookups are performed in a distributed manner. The kvstore only lives on your SH, so it is like setting "local=true" on your lookup command. Bad mojo for bigger deployments.

spyme72
Path Finder

thanks a lot.. removing case_sensitive_match worked..

dgladkikh_splun
Splunk Employee
Splunk Employee

Could you share some data examples in csv file, also how you got this data in KVStore and few lines from index?

0 Karma
Get Updates on the Splunk Community!

Cloud Platform & Enterprise: Classic Dashboard Export Feature Deprecation

As of Splunk Cloud Platform 9.3.2408 and Splunk Enterprise 9.4, classic dashboard export features are now ...

Explore the Latest Educational Offerings from Splunk (November Releases)

At Splunk Education, we are committed to providing a robust learning experience for all users, regardless of ...

New This Month in Splunk Observability Cloud - Metrics Usage Analytics, Enhanced K8s ...

The latest enhancements across the Splunk Observability portfolio deliver greater flexibility, better data and ...