<?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: index time fields extraction from source?? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378439#M6169</link>
    <description>&lt;P&gt;@DavidHourani  i placed the fileds.conf file and other files in the indexers only, but look likes it nor working. any thoughts??&lt;/P&gt;</description>
    <pubDate>Sun, 19 May 2019 15:43:33 GMT</pubDate>
    <dc:creator>rajasekhar14</dc:creator>
    <dc:date>2019-05-19T15:43:33Z</dc:date>
    <item>
      <title>index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378435#M6165</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to do index field extractions from source files, here is the my settings&lt;BR /&gt;
file names are like:&lt;/P&gt;

&lt;P&gt;/tmp/test-raj/abc/bcd.log&lt;BR /&gt;
/tmp/test-raj/xyz/cccc.log&lt;/P&gt;

&lt;P&gt;i want to extract the 3rd directory as a fields called raj&lt;BR /&gt;
raj=abc&lt;BR /&gt;
raj=xyz&lt;BR /&gt;
+&lt;BR /&gt;
+ etc&lt;/P&gt;

&lt;P&gt;Transforms.conf &lt;BR /&gt;
i placed transforms.conf file in UF and HF and indexer&lt;BR /&gt;
[netscreen-error]&lt;BR /&gt;
SOURCE_KEY = MetaData:Source&lt;BR /&gt;&lt;BR /&gt;
REGEX =  \/tmp\/test-raj\/(?\w+[^\/]+)\/\S+ in source&lt;BR /&gt;
FORMAT = raj::"$1"&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;Props.conf&lt;BR /&gt;
i placed props.conf file in UF and HF and indexer&lt;BR /&gt;
[test-123]&lt;BR /&gt;
TRANSFORMS-netscreen = netscreen-error&lt;/P&gt;

&lt;P&gt;fileds.conf&lt;BR /&gt;
[raj]&lt;BR /&gt;
INDEXED = true&lt;/P&gt;

&lt;P&gt;let me know your thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378435#M6165</guid>
      <dc:creator>rajasekhar14</dc:creator>
      <dc:date>2020-09-30T00:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378436#M6166</link>
      <description>&lt;P&gt;Your regex seems incorrect&lt;/P&gt;

&lt;P&gt;Please try in transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[netscreen-error]
SOURCE_KEY = MetaData:Source 
REGEX = \/tmp\/test-raj\/([^\/]+)\/.+
FORMAT = raj::$1
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regex101 =&amp;gt; &lt;A href="https://regex101.com/r/OK0pNj/1"&gt;https://regex101.com/r/OK0pNj/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 08:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378436#M6166</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-19T08:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378437#M6167</link>
      <description>&lt;P&gt;Hi @rajasekhar14,&lt;/P&gt;

&lt;P&gt;In addition to fixing your regex and format as @koshyk mentioned it :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; REGEX = \/tmp\/test-raj\/([^\/]+)\/.+
 FORMAT = raj::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure you add the &lt;CODE&gt;fields.conf&lt;/CODE&gt; file to the indexer as even if your indexed field is written in the metadata the indexer will not use it unless defined in the &lt;CODE&gt;fields.conf&lt;/CODE&gt; file.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 12:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378437#M6167</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-19T12:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378438#M6168</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/221196"&gt;@koshyk&lt;/a&gt; thanks for the answer, i changed my Regex but its not working.&lt;BR /&gt;
&lt;STRONG&gt;now all 3 files are in the only indexers&lt;/STRONG&gt;&lt;BR /&gt;
[splunk@**** local]$ cat transforms.conf &lt;BR /&gt;
[netscreen-error]&lt;BR /&gt;
SOURCE_KEY = MetaData:Source &lt;BR /&gt;
REGEX = \/tmp\/test-raj\/([^\/]+)\/.+&lt;BR /&gt;
FORMAT = raj::$1&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;[splunk@**** local]$ cat props.conf &lt;BR /&gt;
[test-123]&lt;BR /&gt;
TRANSFORMS-netscreen = netscreen-error&lt;/P&gt;

&lt;P&gt;[splunk@*** local]$ cat ../../spl_fields/local/fields.conf &lt;BR /&gt;
[raj]&lt;BR /&gt;
INDEXED = true&lt;/P&gt;

&lt;P&gt;do i need to change these .conf to HF or UF??&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378438#M6168</guid>
      <dc:creator>rajasekhar14</dc:creator>
      <dc:date>2020-09-30T00:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378439#M6169</link>
      <description>&lt;P&gt;@DavidHourani  i placed the fileds.conf file and other files in the indexers only, but look likes it nor working. any thoughts??&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 15:43:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378439#M6169</guid>
      <dc:creator>rajasekhar14</dc:creator>
      <dc:date>2019-05-19T15:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378440#M6170</link>
      <description>&lt;P&gt;if you have HF, you need to send to HF &amp;amp; Indexers &lt;/P&gt;

&lt;P&gt;Need to restart HF &amp;amp; indexers too if possible&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 20:08:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378440#M6170</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-19T20:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378441#M6171</link>
      <description>&lt;P&gt;yeah it depends on where your data is coming from. If its going through a Heavy Forwarder then you need props.conf and transforms.conf on the HF and fields.conf on the indexer. If there is no HF then putting all on the indexer should do the trick. &lt;/P&gt;</description>
      <pubDate>Mon, 20 May 2019 06:30:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378441#M6171</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-20T06:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378442#M6172</link>
      <description>&lt;P&gt;Thanks @DavidHourani &lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:16:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378442#M6172</guid>
      <dc:creator>rajasekhar14</dc:creator>
      <dc:date>2019-05-22T14:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378443#M6173</link>
      <description>&lt;P&gt;Most welcome @rajasekhar14 ! Please accept or upvote my answer and comments &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 14:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378443#M6173</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-22T14:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: index time fields extraction from source??</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378444#M6174</link>
      <description>&lt;P&gt;Hi @koshyk ,&lt;/P&gt;

&lt;P&gt;i have a small question on this, the above settings will use for source file name right? if i want to extract a index filed extraction in side from source file,?&lt;/P&gt;

&lt;P&gt;i changed like this but its not working. can you please take a look.&lt;BR /&gt;
props.conf&lt;BR /&gt;
[ms:iis:auto]&lt;BR /&gt;
TRANSFORMS-raj_namee = test-raj&lt;/P&gt;

&lt;P&gt;Transforms.conf &lt;BR /&gt;
[test-raj]&lt;BR /&gt;
REGEX = ^(?:[^ \n]* ){2}([^ ]+)&lt;BR /&gt;
FORMAT = appname::$1&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;filed.conf&lt;BR /&gt;
INDEXED=true&lt;/P&gt;

&lt;P&gt;and the log format is &lt;/P&gt;

&lt;P&gt;2019-07-17 18:21:33 &lt;STRONG&gt;&lt;EM&gt;xx-xx.xxx&lt;/EM&gt;&lt;/STRONG&gt; test 10.185.162.2 GET /monitor/monitor.html ----&lt;/P&gt;

&lt;P&gt;and i'm using the above regex bold text and it need extract as a appname.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 18:31:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/index-time-fields-extraction-from-source/m-p/378444#M6174</guid>
      <dc:creator>rajasekhar14</dc:creator>
      <dc:date>2019-07-17T18:31:19Z</dc:date>
    </item>
  </channel>
</rss>

