Splunk Enterprise Security

How to rename a field when an event indexed?

rendie
Path Finder

Hello,

I have data with fields kind of "Field Id", "Second Id". And I wanna merge these two fields into one, but when I make EVAL-sourcetype = "Field Id"+"Second Id" as a result I get merge fields name but not value.

Also, I used this configuration in props.conf, but without success

[.stanza.]
FIELDALIAS-extract_fieldId
 = "Field Id" as FieldID
FIELDALIAS-extract_secondId = "Second Id" as SecondID
EVAL-sourcetype =FieldID+SecondID
Labels (2)
0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @rendie,

Can you please provide more information about your need? Do you want to set sourcetype at index time?

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

rendie
Path Finder

This solution doesn't work for me

0 Karma

scelikok
SplunkTrust
SplunkTrust

Hi @rendie ,

Please try below;

EVAL-sourcetype=FieldID.SecondID

 

If this reply helps you an upvote is appreciated.

If this reply helps you an upvote and "Accept as Solution" is appreciated.
0 Karma

rendie
Path Finder

I tried. it doesn't work for me. Field sourcetype is not created.

0 Karma
Get Updates on the Splunk Community!

Cisco Use Cases, ITSI Best Practices, and More New Articles from Splunk Lantern

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...

Exporting Splunk Apps

Join us on Monday, October 21 at 11 am PT | 2 pm ET!With the app export functionality, app developers and ...