<?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: passing source script file name in another field before indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481193#M82483</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;  is this correct to extract from source? i want to extract the file name alone. i want regex for this. please help&lt;/P&gt;

&lt;P&gt;[extract-source]&lt;BR /&gt;
SOURCE_KEY = MetaData:Source &lt;BR /&gt;
FORMAT = job_id::$2&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;source path will be etc/apps/bin/python.py &lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:04:01 GMT</pubDate>
    <dc:creator>DataOrg</dc:creator>
    <dc:date>2020-09-30T05:04:01Z</dc:date>
    <item>
      <title>passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481185#M82475</link>
      <description>&lt;P&gt;i have a script which will be executed from inputs.conf but i need the script file name in a new field instead of source tag.&lt;BR /&gt;
since i have a default source name configured. i want to add script file(source script) Name to the data indexed in the new field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[script:///$SPLUNK_HOME/etc/apps/KIO/bin/Stats.py]
    interval = * * * * *
    source = siebel
    sourcetype = inflowstats
    disabled = False 
    index = index1
    host=server1
    Script=ScriptName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2020 08:58:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481185#M82475</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-04-21T08:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481186#M82476</link>
      <description>&lt;P&gt;how about &lt;CODE&gt;ingest_eval&lt;/CODE&gt; or &lt;CODE&gt;DEST_KEY&lt;/CODE&gt; in transforms.conf?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 09:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481186#M82476</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-21T09:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481187#M82477</link>
      <description>&lt;P&gt;@to4kawa is it possible to hardcode the value ? to any new field&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 09:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481187#M82477</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-04-21T09:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481188#M82478</link>
      <description>&lt;P&gt;I don't know &lt;CODE&gt;hardcode&lt;/CODE&gt; .&lt;BR /&gt;
the field value is indexed as &lt;EM&gt;new value&lt;/EM&gt; by settings.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 10:17:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481188#M82478</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-21T10:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481189#M82479</link>
      <description>&lt;P&gt;@to4kawa how to do it new field creation with static value at transform.conf&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 11:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481189#M82479</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-04-21T11:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481190#M82480</link>
      <description>&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/817188/add-x-hours-to-epoch-time.html#answer-817198"&gt;https://answers.splunk.com/answers/817188/add-x-hours-to-epoch-time.html#answer-817198&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;this answer express to change &lt;CODE&gt;source&lt;/CODE&gt; field value. it can create another field, also.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 11:34:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481190#M82480</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-21T11:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481191#M82481</link>
      <description>&lt;P&gt;@to4kawa  I tried this and not getting any results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;transforms.conf
 [myeval]
 INGEST_EVAL = ScriptName=python_script

 props.conf
 [testLog]
 TRANSFORMS = myeval

fields.conf
 [eval_city]
 INDEXED = True
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2020 14:54:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481191#M82481</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-04-21T14:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481192#M82482</link>
      <description>&lt;P&gt;&lt;CODE&gt;INGEST_EVAL&lt;/CODE&gt; is &lt;CODE&gt;eval&lt;/CODE&gt;&lt;BR /&gt;
use &lt;CODE&gt;"&lt;/CODE&gt;&lt;BR /&gt;
and in props.conf, class name is needed.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 19:41:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481192#M82482</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-21T19:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481193#M82483</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;  is this correct to extract from source? i want to extract the file name alone. i want regex for this. please help&lt;/P&gt;

&lt;P&gt;[extract-source]&lt;BR /&gt;
SOURCE_KEY = MetaData:Source &lt;BR /&gt;
FORMAT = job_id::$2&lt;BR /&gt;
WRITE_META = true&lt;/P&gt;

&lt;P&gt;source path will be etc/apps/bin/python.py &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481193#M82483</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-09-30T05:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481194#M82484</link>
      <description>&lt;P&gt;what's &lt;CODE&gt;$2&lt;/CODE&gt;?&lt;BR /&gt;
where's REGEX?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2020 08:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481194#M82484</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-22T08:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481195#M82485</link>
      <description>&lt;P&gt;worked by adding default value in inputs.conf directly.&lt;BR /&gt;
 [script://path/your_script.py]&lt;BR /&gt;
 _meta = script_name::abc.py&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481195#M82485</guid>
      <dc:creator>DataOrg</dc:creator>
      <dc:date>2020-09-30T05:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: passing source script file name in another field before indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481196#M82486</link>
      <description>&lt;P&gt;Duplicate of &lt;A href="https://answers.splunk.com/answers/818655/i-need-to-index-the-source-field-value-into-new-fi.html"&gt;https://answers.splunk.com/answers/818655/i-need-to-index-the-source-field-value-into-new-fi.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2020 11:14:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/passing-source-script-file-name-in-another-field-before-indexing/m-p/481196#M82486</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-04-23T11:14:03Z</dc:date>
    </item>
  </channel>
</rss>

