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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...