Splunk Search

How I can find field defintion/regex for a particular source type with metadata?

aartist
New Member

I like to find out how a particular field is extracted from a given sourcetype. Can I find this via splunk front end using metadata or similar command?
<P>
Thanks.

Tags (3)
0 Karma

woodcock
Esteemed Legend

If I understand you correctly, like this (be sure to swap out PutYourSourcetypeHere and PutYourFieldNameHere with your strings):

| rest/services/configs/conf-props sourcetype="PutYourSourcetypeHere" | eval fields_with_string="," | foreach * [eval fields_with_string=if((like($<<FIELD>>$, "%PutYourFieldNameHere%")), fields_with_string . $<<FIELD>>$ . ",", fields_with_string)] | where fields_with_string!=","
0 Karma

woodcock
Esteemed Legend

Give a complete example of what you have as data and what you expect to get as a result of your search. I have no idea what you are asking.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...