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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...