I need a search which returns events where a specific field contains any one of many values. Typically this is done with the "OR" logical operator. However, I need to search for thousands of values which cannot be expressed using a regular expression.
I've seen discussions of using "lookups" for this. However, if I understand correctly, that would require administrative access to the Splunk server (which I don't have) to configure the lookup file and later update it.
I've also seen suggestions to write a script to generate a massive search string with all the "OR"s in it. I'd like to investigate other solutions before adopting that idea.
Ideally, I'd like to provide the list of field values to match in a file.
Is there a way?
Perhaps you can investigate the inputlookup / outputlookup methods of creating and maintaining a lookup file, e.g.
|inputlookup file | modify stuff | outputlookup file
Hello, thanks for your suggestion, but as mentioned in my question I have looked into lookups and I believe it would require administrative access to the Splunk server to configure (e.g. edit .conf file and upload lookup file to appropriate folder) and maintain (e.g. replace lookup file when the search terms change) the lookup files. This is something I do not have and cannot get.
I confirmed that it is true that you can provision the lookup_file via manager. 🙂
I ended up using "... | lookup lookupfile.csv useridfield as user | search tagfield = 1" where the lookupfile has two columns, useridfield and tagfield". And each row contains a userid and a '1'.
Works great. Thanks!