Splunk Search

Using the map command to run searches from a lookup.

paras
Explorer

I have this lookup that has a list of searches I want to run.

Screen Shot 2022-06-02 at 8.52.39 AM.png

I want to run a search that can run output the "magic" values search results. The expected search.

This is the search I am using, " | inputlookup test.csv  | map search=$magic$ "

When I run this this is the error I am getting:

Unable to run query '"search index::client* sourcetype::ActiveDirectory | fields admonEventType memberOf sAMAccountName sAMAccountType | head 100 | fieldsummary maxvals=2 | where count > 0 | table field values"'.
"
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try using a double map

| inputlookup test.csv
| map search="| makeresults | map search="$$magic$$

chrisyounger
SplunkTrust
SplunkTrust

For anyone else like me in the future trying to get this to work, the solution from @ITWhisperer is for use in a dashboard. You should be able to get this to work outside a dashboard like so: 

| inputlookup test.csv
| map search="| makeresults | map search=\"$magic$\""
0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...