<?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: Changing Sourcetype at Index Time on Heavy Forwarder? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/524382#M88534</link>
    <description>&lt;P&gt;hello everyone, I want to change sourcetype and index in incoming events. In 514UDP I have many different type of logs (cisco, Fortigate, Fortiweb, ....)&lt;/P&gt;&lt;P&gt;How could I change Sourcetype and Index on Heavy Forwarder :(this is my try but it does not work) :&lt;/P&gt;&lt;P&gt;Props:&lt;/P&gt;&lt;P&gt;[source::udp:514]&lt;BR /&gt;TRANSFORMS-1sourcetype = fortigateevent&lt;BR /&gt;TRANSFORMS-2index_routeing = fortigateeventindex&lt;/P&gt;&lt;P&gt;Transforms:&lt;/P&gt;&lt;P&gt;[fortigateevent]&lt;BR /&gt;REGEX = devname= .*&lt;BR /&gt;DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;FORMAT = sourcetype::fgt_log&lt;/P&gt;&lt;P&gt;[fortigateeventindex]&lt;BR /&gt;REGEX = .*&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = fortinet&lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2020 11:12:17 GMT</pubDate>
    <dc:creator>tahaeeh</dc:creator>
    <dc:date>2020-10-13T11:12:17Z</dc:date>
    <item>
      <title>Changing Sourcetype at Index Time on Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/388792#M88532</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to change the sourcetype of data being received from a UDP Syslog stream via a heavy forwarder.&lt;/P&gt;
&lt;P&gt;On the heavy forwarder I have deployed an app configured with the following:&lt;/P&gt;
&lt;P&gt;inputs.conf:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[udp://10.1.2.3:514]
connection_host = dns
index = MyIndex
sourcetype = syslog
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Data sent to the Splunk Heavy Forwarder host (Splunk version 6.4.1 running on Windows) is received by Splunk and the sourcetype, as expected is set to syslog. I would like to change the sourcetype to something more descriptive and have found if I just edit the sourcetype in the inputs.conf file data is not received (I assume setting the sourcetype to syslog effects the way Splunk behaves as it receives the data?)&lt;/P&gt;
&lt;P&gt;So anyway I created a props.conf file with the following in:&lt;BR /&gt;props.conf:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-changesourcetype = set_sourcetype_to_MyAppUDP
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then created a transforms.conf like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[set_sourcetype_to_MyAppUDP]
FORMAT = sourcetype::MyApp-UDP
DEST_KEY = MetaData:Sourcetype
WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've deployed it to the heavy forwarder and am receiving data but the sourcetype is not being changed and I'm unsure why?&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;Eddie&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 16:14:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/388792#M88532</guid>
      <dc:creator>marrette</dc:creator>
      <dc:date>2020-10-13T16:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Sourcetype at Index Time on Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/388793#M88533</link>
      <description>&lt;P&gt;You may need to include a &lt;CODE&gt;REGEX&lt;/CODE&gt; in the transforms&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [set_sourcetype_to_MyAppUDP]
 REGEX = .
 FORMAT = sourcetype::MyApp-UDP
 DEST_KEY = MetaData:Sourcetype
 WRITE_META = true
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2019 03:39:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/388793#M88533</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2019-04-03T03:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Sourcetype at Index Time on Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/524382#M88534</link>
      <description>&lt;P&gt;hello everyone, I want to change sourcetype and index in incoming events. In 514UDP I have many different type of logs (cisco, Fortigate, Fortiweb, ....)&lt;/P&gt;&lt;P&gt;How could I change Sourcetype and Index on Heavy Forwarder :(this is my try but it does not work) :&lt;/P&gt;&lt;P&gt;Props:&lt;/P&gt;&lt;P&gt;[source::udp:514]&lt;BR /&gt;TRANSFORMS-1sourcetype = fortigateevent&lt;BR /&gt;TRANSFORMS-2index_routeing = fortigateeventindex&lt;/P&gt;&lt;P&gt;Transforms:&lt;/P&gt;&lt;P&gt;[fortigateevent]&lt;BR /&gt;REGEX = devname= .*&lt;BR /&gt;DEST_KEY = MetaData:Sourcetype&lt;BR /&gt;FORMAT = sourcetype::fgt_log&lt;/P&gt;&lt;P&gt;[fortigateeventindex]&lt;BR /&gt;REGEX = .*&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = fortinet&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 11:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-Sourcetype-at-Index-Time-on-Heavy-Forwarder/m-p/524382#M88534</guid>
      <dc:creator>tahaeeh</dc:creator>
      <dc:date>2020-10-13T11:12:17Z</dc:date>
    </item>
  </channel>
</rss>

