<?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: Transforming events twice in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35827#M6519</link>
    <description>&lt;P&gt;The reason for doing it is that syslog data are not only one type: firewall, routers, linux servers and so on. So, in this particular case, you cannot set the sourcetype and index at the input.&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2013 21:18:09 GMT</pubDate>
    <dc:creator>OL</dc:creator>
    <dc:date>2013-08-15T21:18:09Z</dc:date>
    <item>
      <title>Transforming events twice</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35824#M6516</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;

&lt;P&gt;Would anyone know if there is a way to apply a transform twice on two different sourcetype. Explanation: events are received with sourcetype syslog. I use a "transforms" on sourcetype syslog to change the sourcetype of some events to firewall_syslog. I then would like to change the index of the events with sourcetype firewall_syslog to index=firewall. The first transform is being applied, but not the second one. Here is how I do it:&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog]
TRANSFORMS-01 = sourcetype2fw

[firewall_syslog]
TRANSFORMS-02 = index2fw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype2fw]
REGEX = 10.12.14.*
DEST_KEY = MetaData:Sourcetype
FORMAT = sourcetype::firewall_syslog

[index2fw]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = index::firewall
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know that I could use the second transform in the syslog sourcetype and this is working, but this would imply that we need to run the same REGEX twice (once for the change of sourcetype and once for the change of index). The way I thought and which doesn't seem to work would run the REGEX only once (on ethe sourcetype) when the second REGEX would accept everything.&lt;/P&gt;

&lt;P&gt;Any idea?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Olivier&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:34:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35824#M6516</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2020-09-28T14:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming events twice</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35825#M6517</link>
      <description>&lt;P&gt;Why would you do it this way when you can just assign the correct sourcetype and index to the input source?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 20:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35825#M6517</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2013-08-15T20:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming events twice</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35826#M6518</link>
      <description>&lt;P&gt;Question are you picking your syslog data from a flat file or UDP stream?  Is every syslog entry being sent to one syslog?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 21:02:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35826#M6518</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2013-08-15T21:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming events twice</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35827#M6519</link>
      <description>&lt;P&gt;The reason for doing it is that syslog data are not only one type: firewall, routers, linux servers and so on. So, in this particular case, you cannot set the sourcetype and index at the input.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2013 21:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35827#M6519</guid>
      <dc:creator>OL</dc:creator>
      <dc:date>2013-08-15T21:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming events twice</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35828#M6520</link>
      <description>&lt;P&gt;You must be pulling all syslog into a network input on your indexer. Best practice is to bring syslog to a receiver like a syslog-ng box. Use the universal forwarder to pick up. If you have the logs write to a folder by host you can assign pickup by each folder specifying index and sourcetype. This also means when you add indexers later you can leverage autoLB (load balance) on the forwarder.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:55:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Transforming-events-twice/m-p/35828#M6520</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2013-08-16T10:55:37Z</dc:date>
    </item>
  </channel>
</rss>

