Splunk Enterprise

How to insert data correctly with collect command (include fields and values)?

jordilazo
Explorer

Hi,

I'm pretty new to splunk and I have a question.

I am trying to send information from one index to another with the "collect" command.

The problem is that when I send the events to the new index the field and value do not appear as in the old index (they disappear).

I am using this sentence:

 

index = legacy sourcetype = old_legacy | collect index= mew_legacy

 

 

But in the new index i'm not receiving the FIELD->VALUE .

Labels (2)
0 Karma
1 Solution

johnhuang
Motivator

Make sure you define all the fields and values to be indexed.

 

<base search>
| table field1 field2 field3 ... 
| collect index=<new_index>

View solution in original post

johnhuang
Motivator

Make sure you define all the fields and values to be indexed.

 

<base search>
| table field1 field2 field3 ... 
| collect index=<new_index>

jordilazo
Explorer

Thank you. That was what was missing

0 Karma
Get Updates on the Splunk Community!

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...