<?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: Inputs defined sourcetype overwrite a specific source using props and transforms in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427052#M74835</link>
    <description>&lt;OL&gt;
&lt;LI&gt;Why the &lt;CODE&gt;...&lt;/CODE&gt; at the start of your source:: stanza in props?&lt;/LI&gt;
&lt;LI&gt;Your regex in transforms.conf doesn’t make much sense to me. Can you explain based on the sample folder structure which bit you want to capture into the source type field? You’re currently assigning &lt;CODE&gt;$1&lt;/CODE&gt; which is the first capture group and based on your regex that is the &lt;CODE&gt;/var/log/&lt;/CODE&gt; bit...&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Sat, 02 Jun 2018 00:44:04 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-06-02T00:44:04Z</dc:date>
    <item>
      <title>Inputs defined sourcetype overwrite a specific source using props and transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427051#M74834</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;
   all my /var/log file are are input configured to redirect to sourcetype=unixlogs and now i would like to redirect all /var/log/smart* to different sourcetypes based on the folder structure its having.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;`[monitor:///var/log]
 disabled = 0
index=inux
sourcetype = unixlog`

Props
`[ source::.../var/log/smart... ]
TRANSFORMS-setSourceType = smart_source`

    Transforms:

     [ smart_source ]
     REGEX ="(\/var\/log\/)(?&amp;lt;![^\/\n])(\w..+)\/(\w..+)"
      DEST_KEY = MetaData:Sourcetype
    FORMAT = sourcetype::$1
    SOURCE_KEY = MetaData:Source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;regx also not working &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    /var/log/smart-agent/smart-agent.log
    /var/log/smart-agent/smart-agent.out
    /var/log/smart-infra-solr/solr.log
    /var/log/smart-infra-solr/solr_gc.log
    /var/log/smart-metrics-collector/smart-metrics-collector.log
    /var/log/smart-metrics-collector/collector-gc.log-201804231606
    /var/log/smart-metrics-collector/collector-gc.log-201805100755
    /var/log/smart-metrics-collector/gc.log-201804231606
    /var/log/smart-metrics-collector/gc.log-201805100755
    /var/log/smart-metrics-collector/hbase-ams-master-xo1ph140.log
    /var/log/smart-metrics-grafana/grafana.log
    /var/log/smart-metrics-grafana/grafana.out
    /var/log/smart-metrics-monitor/smart-metrics-monitor.out
    /var/log/smart-server/smart-alerts.log
    /var/log/smart-server/smart-audit.log
    /var/log/smart-server/smart-config-changes.log
    /var/log/smart-server/smart-eclipselink.log
    /var/log/smart-server/smart-server.log
    /var/log/smart-server/smart-server-command.log
    /var/log/smart-server/capshed-view/capshed-view.log
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Jun 2018 20:42:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427051#M74834</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2018-06-01T20:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs defined sourcetype overwrite a specific source using props and transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427052#M74835</link>
      <description>&lt;OL&gt;
&lt;LI&gt;Why the &lt;CODE&gt;...&lt;/CODE&gt; at the start of your source:: stanza in props?&lt;/LI&gt;
&lt;LI&gt;Your regex in transforms.conf doesn’t make much sense to me. Can you explain based on the sample folder structure which bit you want to capture into the source type field? You’re currently assigning &lt;CODE&gt;$1&lt;/CODE&gt; which is the first capture group and based on your regex that is the &lt;CODE&gt;/var/log/&lt;/CODE&gt; bit...&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sat, 02 Jun 2018 00:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427052#M74835</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-02T00:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs defined sourcetype overwrite a specific source using props and transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427053#M74836</link>
      <description>&lt;P&gt;If you're monitoring the path &lt;CODE&gt;[monitor:///var/log]&lt;/CODE&gt;, then to override sourcetype of all sources/files with path starting with &lt;CODE&gt;/var/log/smart&lt;/CODE&gt;, try this on your indexer/heavy forwarder&lt;/P&gt;

&lt;P&gt;Props (no spaces in stanza name)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/smart*]
TRANSFORMS-setSourceType = smart_source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Transforms:(no spaces in stanza name)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[smart_source]
# Do not need doublequotes. Simple regex to capture folder name after /var/log
REGEX = \/var\/log\/([^\/\n]+)
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::$1
SOURCE_KEY = MetaData:Source
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Jun 2018 17:35:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427053#M74836</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-02T17:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs defined sourcetype overwrite a specific source using props and transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427054#M74837</link>
      <description>&lt;P&gt;Do i need to get those props and transforms on indexers also ?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 17:17:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427054#M74837</guid>
      <dc:creator>svemurilv</dc:creator>
      <dc:date>2018-06-06T17:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inputs defined sourcetype overwrite a specific source using props and transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427055#M74838</link>
      <description>&lt;P&gt;If youre using a heavy forwarder (or intermediate forwader) which is a full Enterprise Splunk instance then it should (just go there), not on indexers. If your data is coming from univeraal forwarder to indexers directly this should be done on Indexers.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 18:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Inputs-defined-sourcetype-overwrite-a-specific-source-using/m-p/427055#M74838</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-06-06T18:06:47Z</dc:date>
    </item>
  </channel>
</rss>

