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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...