<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is my extracted field not showing up in search result in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442199#M171464</link>
    <description>&lt;P&gt;Thanks @vishaltaneja07011993 your solution (using field transformation in field extraction) worked for me.  &lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2019 15:30:54 GMT</pubDate>
    <dc:creator>arpitpropay</dc:creator>
    <dc:date>2019-05-08T15:30:54Z</dc:date>
    <item>
      <title>Why is my extracted field not showing up in search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442195#M171460</link>
      <description>&lt;P&gt;I have several log files as source of Splunk events. &lt;/P&gt;

&lt;P&gt;C:\logs\Srv1\file1_2019-05-06.log&lt;BR /&gt;
C:\logs\Srv84\file3_2019-05-06.log&lt;BR /&gt;
C:\logs\Glob9\file18_2019-05-06.log&lt;/P&gt;

&lt;P&gt;I am trying to extract the immediate parent directory name from the &lt;CODE&gt;source&lt;/CODE&gt; field of events. So in a custom extracted field "appname", I am hoping to get values Srv1, Srv84 and Glob9 from examples above.&lt;/P&gt;

&lt;P&gt;Here's what I am doing.&lt;/P&gt;

&lt;P&gt;Splunk Web &amp;gt; Settings &amp;gt; Fields &amp;gt; Fields Extractions &amp;gt; Add new&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Destination app&lt;/STRONG&gt;: search&lt;BR /&gt;
&lt;STRONG&gt;Name&lt;/STRONG&gt;: source_app_name&lt;BR /&gt;
&lt;STRONG&gt;Apply to&lt;/STRONG&gt;: &lt;CODE&gt;source&lt;/CODE&gt;     &lt;STRONG&gt;named&lt;/STRONG&gt;: app_name&lt;BR /&gt;
&lt;STRONG&gt;Type&lt;/STRONG&gt;: Inline&lt;BR /&gt;
&lt;STRONG&gt;Extraction/Transform&lt;/STRONG&gt;: &lt;CODE&gt;^.+\x5C(?&amp;lt;appname&amp;gt;(.+))\x5C[^\x5C]*$&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;Sharing: Global, All apps, Read permission to everyone.&lt;/P&gt;

&lt;P&gt;When I run my search &lt;CODE&gt;...| extract reload=t&lt;/CODE&gt; I can't find &lt;CODE&gt;appname&lt;/CODE&gt; field in All fields. All fields is selected in the Select field list. &lt;/P&gt;

&lt;P&gt;Am I doing anything wrong with my field extraction, or with my search? &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:22:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442195#M171460</guid>
      <dc:creator>arpitpropay</dc:creator>
      <dc:date>2020-09-30T00:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my extracted field not showing up in search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442196#M171461</link>
      <description>&lt;P&gt;Hello @arpitporpay&lt;/P&gt;

&lt;P&gt;The best way to do this is:&lt;BR /&gt;
Go to Splunk Web &amp;gt; Settings &amp;gt; Fields &amp;gt; Fields Extractions &amp;gt; Add new&lt;/P&gt;

&lt;P&gt;then add the below attributes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;app_name: &amp;lt;your app name&amp;gt;
name: source_app_name
sourcetype : &amp;lt; as per your requirement&amp;gt;  --- the above mentioned source is incorrect as it is asking for which source it need to apply so it is better to use sourcetype.
Type: uses trasform
extraction: appname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Go to Splunk Web &amp;gt; Settings &amp;gt; Fields &amp;gt; Field transformations &amp;gt; Add new&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;destination_app: &amp;lt;your app name&amp;gt;
name : appname
type: regex-based
regular expression: ^.+\x5C(?&amp;lt;appname&amp;gt;(.+))\x5C[^\x5C]*$
source_key : source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 07:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442196#M171461</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-05-08T07:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my extracted field not showing up in search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442197#M171462</link>
      <description>&lt;P&gt;Otherwise:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;[your_sourcetype]&lt;BR /&gt;
REPORT-appname1= appname&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[appname]&lt;BR /&gt;
REGEX= ^.+\x5C(?(.+))\x5C[^\x5C]*$&lt;BR /&gt;
SOURCE_KEY = source&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 07:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442197#M171462</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-05-08T07:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my extracted field not showing up in search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442198#M171463</link>
      <description>&lt;P&gt;@arpitpropay : Could you please accept the answer to close the conversation.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 12:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442198#M171463</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-05-08T12:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is my extracted field not showing up in search result</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442199#M171464</link>
      <description>&lt;P&gt;Thanks @vishaltaneja07011993 your solution (using field transformation in field extraction) worked for me.  &lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 15:30:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-my-extracted-field-not-showing-up-in-search-result/m-p/442199#M171464</guid>
      <dc:creator>arpitpropay</dc:creator>
      <dc:date>2019-05-08T15:30:54Z</dc:date>
    </item>
  </channel>
</rss>

