Splunk Search

Error Message About Literals

genesiusj
Builder

Hello,
One of my biggest pet peeves about software is the lack of information around error messages. Obviously, a developer wrote the error code and its associated message. However, most software has a vast black hole around such messages.

Case is point.
"Error in 'search' command: Unable to parse the search: Right hand side of IN must be a collection of literals. '(localrefid = "WW201929400001699")' is not a literal."

If I Google this error "Unable to parse the search: Right hand side of IN must be a collection of literals. ", I receive ONE hit.
link text

Searching this page for literal leads to
link text

Which in turn leads to NOWHERE, none of the links work.

Here is my code.

index="test"
    AND priority="INFO"
    AND ("STARTED" OR "FINISHED") 
    AND (localrefid IN 
    [ search index="test"
        AND priority="INFO"
        AND (localrefid!="12345" AND localrefid!="null" OR localrefid!="")
        AND ("STARTED" OR "FINISHED") 
    | dedup localrefid 
    | table localrefid ]
    OR token IN
    [ search index="test"
        AND priority="INFO"
        AND localrefid!="12345"
        AND (token!="null" AND token!="")
        AND ("STARTED" OR "FINISHED") 
    | dedup token 
    | table token ] ) 
| dedup _raw
| rex field=_raw "(FINISHED|STARTED\s)\:\s(?<transMethod>\w*)\s" 
| rex field=_raw "Total Time\s(?<methodTime>\d*\.?\d*)\sseconds" 
| eval methodTime=round(methodTime,3) 
| transaction localrefid, token
| sort +_time, localrefid, token 
| table _time, appName, transMethod, localrefid, token, eventcount, methodTime, _raw

Thanks in advance for your assistance with this undocumented error (at least in my search of the Internet), and for dealing with my pet peeve. 🙂

God bless,
Genesius

Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

IN requires a comma-separated list of field names, numbers, or strings. Run the subsearches alone and you'll find they are not returning such output. Creative use of the format command may be able to remedy that.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...