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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...