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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...