Splunk Search

How to assign search_now value with info_max_time in _raw?

LearningGuy
Motivator

Hello,

How to assign search_now value with info_max_time in _raw?

I am trying to push "past" data using collect command into summary index. 
I want to use search_now as a baseline time

I appreciate your help.  Thank you

Here's my attempt using some code from @bowesmana , but it gave me duplicate search_now:

 

 

index=original_index

| addinfo
| eval _raw=printf("search_now=%d", info_max_time)

| foreach "*"
[| eval _raw = _raw.case(isnull('<<FIELD>>'),"",
mvcount('<<FIELD>>')>1,", <<FIELD>>=\"".mvjoin('<<FIELD>>',"###")."\"",
true(), ", <<FIELD>>=\"".'<<FIELD>>'."\"")
| fields - "<<FIELD>>" ]

| collect   index=summary  testmode=false    file=summary_test_1.stash_new   name=summary_test_1"   marker="report=\"summary_test_1\""

 

 

 

Labels (3)
0 Karma

LearningGuy
Motivator

I think I figured it out

index=original_index

| addinfo
| eval search_now=info_max_time
| eval _raw=printf("_time=%d", info_min_time)

| foreach "*"
[| eval _raw = _raw.case(isnull('<<FIELD>>'),"",
mvcount('<<FIELD>>')>1,", <<FIELD>>=\"".mvjoin('<<FIELD>>',"###")."\"",
true(), ", <<FIELD>>=\"".'<<FIELD>>'."\"")
| fields - "<<FIELD>>" ]

| collect   index=summary  testmode=false    file=summary_test_1.stash_new   name=summary_test_1"   marker="report=\"summary_test_1\""

 

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes & Cloud Monitoring with Splunk IM

Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team on ...

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

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