Getting Data In

Variable string processing in variable string in map command

litmuspaper
Loves-to-Learn Lots

litmuspaper_0-1604391270333.png

IF the _raw is the same as above, I want to search with the query below.

Index=_internal sourcetype=splunkd

 

I want to use the map command with the contents of the C column. Without putting A and B columns in the map command

NO  ->>  | map search="search earliest=-1d@d latest=now index=$a$ sourcetype=$b$"

 

I used this SPL, but it did not produce the desired result.

| map search="search earliest=-1d@d latest=now $c$"

I guess this query seems to mean this.

search earliest=-1d@d latest=now index=$a$ sourcetype=$b$

 

Help, Variable string processing in variable string in map command. Please

0 Karma

richgalloway
SplunkTrust
SplunkTrust

All searches should specify an index for better performance.  Those searches that do not specify an index will search the role's default index(es), which may not include the desired index.  If your role does not include "_internal" as a default index then searching "$c$" will return nothing if "$c$" only exists in the internal index.

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

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...