<?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: remove path from source to only show file name for file monitor input in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433125#M7778</link>
    <description>&lt;P&gt;did you call it through props.conf?&lt;/P&gt;

&lt;P&gt;Like:&lt;BR /&gt;
[your_sourcetype]&lt;BR /&gt;
TRANSFORMS-sourcename= replacedefaultsource&lt;/P&gt;</description>
    <pubDate>Thu, 31 Jan 2019 11:48:54 GMT</pubDate>
    <dc:creator>vishaltaneja070</dc:creator>
    <dc:date>2019-01-31T11:48:54Z</dc:date>
    <item>
      <title>remove path from source to only show file name for file monitor input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433122#M7775</link>
      <description>&lt;P&gt;Is there a way at input time to omit the path of the file monitor to leave only the file names ?&lt;/P&gt;

&lt;P&gt;path monitored :&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;/opt/csv/*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;in the location - the files ..&lt;/P&gt;

&lt;P&gt;filenameA.csv&lt;BR /&gt;
filenameB.csv&lt;BR /&gt;
    filenameC.csv&lt;BR /&gt;
    filenameD.csv&lt;/P&gt;

&lt;P&gt;but the source is alway prepended with the path.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/opt/csv/filenameA.csv
/opt/csv/filenameB.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can this be removed at input ?&lt;/P&gt;

&lt;P&gt;gratzi&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 12:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433122#M7775</guid>
      <dc:creator>Skins</dc:creator>
      <dc:date>2019-01-30T12:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: remove path from source to only show file name for file monitor input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433123#M7776</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/219274"&gt;@Skins&lt;/a&gt;, &lt;/P&gt;

&lt;P&gt;This can be done at Parsing time using transforms.conf&lt;BR /&gt;
     [replacedefaultsource]&lt;BR /&gt;
     SOURCE_KEY = MetaData:Source&lt;BR /&gt;
     REGEX = \/opt\/csv\/(\w+.\w+)&lt;BR /&gt;
     DEST_KEY = MetaData:Source&lt;BR /&gt;
     FORMAT= source::$1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433123#M7776</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2020-09-29T23:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: remove path from source to only show file name for file monitor input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433124#M7777</link>
      <description>&lt;P&gt;tried this exactly as above in transforms.conf and had no effect&lt;/P&gt;

&lt;P&gt;splunk was restarted.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 11:38:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433124#M7777</guid>
      <dc:creator>Skins</dc:creator>
      <dc:date>2019-01-31T11:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: remove path from source to only show file name for file monitor input</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433125#M7778</link>
      <description>&lt;P&gt;did you call it through props.conf?&lt;/P&gt;

&lt;P&gt;Like:&lt;BR /&gt;
[your_sourcetype]&lt;BR /&gt;
TRANSFORMS-sourcename= replacedefaultsource&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 11:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/remove-path-from-source-to-only-show-file-name-for-file-monitor/m-p/433125#M7778</guid>
      <dc:creator>vishaltaneja070</dc:creator>
      <dc:date>2019-01-31T11:48:54Z</dc:date>
    </item>
  </channel>
</rss>

