Splunk Search

How to assign search_now value with info_max_time in _raw?

LearningGuy
Builder

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
Builder

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!

Introducing the Splunk Community Dashboard Challenge!

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

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...