Splunk Search

Search using MAP COMMAND

ssadanala1
Contributor

I have dropdown which has to execute the two different searches based on token picker 

I am trying to implement the mechanism using the functionality below .Map is not returning any results

|makeresults | eval a = "index=_internal|head1" |eval b = "index=main|head1"|eval search1 = case($tok$=1,a ,1=1,b) |map search = "search $search1$"

Labels (4)
Tags (1)
0 Karma

niketn
Legend

@ssadanala1 do you mean token picker or time picker? Could you add more details about your use case? What are the two SPLs that you want to run and what is the condition based on token?

Based on the details about your use case seems like you do not need map command. You can use input <change> event handler or an independent search.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...