<?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 Is there a better way to edit my current inputs.conf for sourcetypes defined by path? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237171#M46064</link>
    <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;I have a dozen+ inputs I am creating. I feel there there should be a smarter way of doing this. As you can see, I am naming the sourcetype after the log. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/paidsearch/autopilot/logs/collateral.log]
index=paidsearch
sourcetype=paidsearch:collateral

[monitor:///opt/paidsearch/autopilot/logs/partner.log]
index=paidsearch
sourcetype=paidsearch:partner
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Oct 2016 17:39:41 GMT</pubDate>
    <dc:creator>daniel333</dc:creator>
    <dc:date>2016-10-07T17:39:41Z</dc:date>
    <item>
      <title>Is there a better way to edit my current inputs.conf for sourcetypes defined by path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237171#M46064</link>
      <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;I have a dozen+ inputs I am creating. I feel there there should be a smarter way of doing this. As you can see, I am naming the sourcetype after the log. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///opt/paidsearch/autopilot/logs/collateral.log]
index=paidsearch
sourcetype=paidsearch:collateral

[monitor:///opt/paidsearch/autopilot/logs/partner.log]
index=paidsearch
sourcetype=paidsearch:partner
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237171#M46064</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2016-10-07T17:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way to edit my current inputs.conf for sourcetypes defined by path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237172#M46065</link>
      <description>&lt;P&gt;Yes there is.&lt;BR /&gt;
(NOTE I HAVEN'T TESTED THE BELOW)&lt;/P&gt;

&lt;P&gt;Collection layer (normally a universal forwarder):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [monitor:///opt/paidsearch/autopilot/logs/*.log]
 index=paidsearch
 sourcetype=paidsearch:rename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Parsing layer (before indexing, usually a heavy forwarder or indexer):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# props.conf
[paidsearch:rename]
TRANSFORMS-changesourcetype = set_paidsearch_sourcetype_from_filename


# transforms.conf 
[set_paidsearch_sourcetype_from_filename]
SOURCE_KEY = MetaData::Source
REGEX = ([^\/]+)\.\w+$
FORMAT = paidsearch:$1
DEST_KEY = MetaData::Sourcetype
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:08:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237172#M46065</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-10-07T18:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way to edit my current inputs.conf for sourcetypes defined by path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237173#M46066</link>
      <description>&lt;P&gt;There must be all kinds of ways - I create tiny little Java programs for this type of cases...&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 18:08:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237173#M46066</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-10-07T18:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way to edit my current inputs.conf for sourcetypes defined by path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237174#M46067</link>
      <description>&lt;P&gt;I usually think changing sourcetype is evil and should be avoided. But this is nice. I like it.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 20:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237174#M46067</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-10-07T20:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a better way to edit my current inputs.conf for sourcetypes defined by path?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237175#M46068</link>
      <description>&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [monitor:///opt/paidsearch/autopilot/logs]
 index=paidsearch
 sourcetype=paidsearch
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf (at the same Splunk instance because this is input stage configuration)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [source::/opt/paidsearch/autopilot/logs/collateral.log]
 sourcetype=paidsearch:collateral
 [source::/opt/paidsearch/autopilot/logs/partner.log]
 sourcetype=paidsearch:partner
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2016 21:00:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-there-a-better-way-to-edit-my-current-inputs-conf-for/m-p/237175#M46068</guid>
      <dc:creator>Masa</dc:creator>
      <dc:date>2016-10-10T21:00:46Z</dc:date>
    </item>
  </channel>
</rss>

