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!

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...