Splunk Search

extract field from MetaData:Source

schose
Builder

Hi all,

I'm trying to extract the field "vservice" from Source as the last two characters (after _) from sourcetype "catalina".

props.conf

[catalina]
REPORT-vservice=vservice

transforms.conf

[vservice]
REGEX=_(\w\w)$
FORMAT=vservice::$1
SOURCE_KEY=MetaData:Source

I don't see why it's not working... 😞

index="myindex" | rex field=source _(?<vservice>\w\w)$ 

which should be the same is working fine for me.

Regards,

Andreas

1 Solution

schose
Builder

hi,

placing

SOURCE_KEY=MetaData:Source with
SOURCE_KEY=source

in transforms.conf seems to work.

Regards,

Andreas

View solution in original post

schose
Builder

hi,

placing

SOURCE_KEY=MetaData:Source with
SOURCE_KEY=source

in transforms.conf seems to work.

Regards,

Andreas

Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...