<?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: Props/transforms rewrite of _raw is adding a blank event in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Props-transforms-rewrite-of-raw-is-adding-a-blank-event/m-p/73665#M15103</link>
    <description>&lt;P&gt;I'm totally guessing here, but the REGEX might be picking up a cr/lf after source, then inserting that into the _raw data, which is then being interpreted as a separate event. &lt;/P&gt;

&lt;P&gt;How does it work if you try:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;    REGEX = ^source::([^\r\n]+)&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Apr 2012 16:26:25 GMT</pubDate>
    <dc:creator>jeff</dc:creator>
    <dc:date>2012-04-12T16:26:25Z</dc:date>
    <item>
      <title>Props/transforms rewrite of _raw is adding a blank event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-transforms-rewrite-of-raw-is-adding-a-blank-event/m-p/73664#M15102</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am using a props/transforms TRANSFORM to add the source (log file) name to the _raw log event line.&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[GC_throughput]
TRANSFORMS-GC_throughput = GC_add_source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[GC_add_source]
SOURCE_KEY = MetaData:Source
REGEX = ^source::(.*)$
FORMAT = $1 $0
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For some reason an "extra", event is being created on the Splunk server which is empty apart from the added source field. It doesn't even have a timestamp or anything, so is given a timestamp at the time it was indexed.&lt;/P&gt;

&lt;P&gt;Ie. when not using the props/transforms, there are two events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2012-02-17T13:19:43.101+0000: 1906587.847: [GC [PSYoungGen: 261184K-&amp;gt;608K(261440K)] 422309K-&amp;gt;161797K(1047872K), 0.0133890 secs]
2012-02-17T12:45:13.623+0000: 1904518.369: [GC [PSYoungGen: 261024K-&amp;gt;384K(261504K)] 422093K-&amp;gt;161509K(1047936K), 0.0166770 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I use the props/transform:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/tmp/verboseSunGC.log
/tmp/verboseSunGC.log 2012-02-17T13:19:43.101+0000: 1906587.847: [GC [PSYoungGen: 261184K-&amp;gt;608K(261440K)] 422309K-&amp;gt;161797K(1047872K), 0.0133890 secs]
/tmp/verboseSunGC.log 2012-02-17T12:45:13.623+0000: 1904518.369: [GC [PSYoungGen: 261024K-&amp;gt;384K(261504K)] 422093K-&amp;gt;161509K(1047936K), 0.0166770 secs] [Times: user=0.01 sys=0.00, real=0.01 secs] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Why is this, and/or what am  I doing wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2012 14:38:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-transforms-rewrite-of-raw-is-adding-a-blank-event/m-p/73664#M15102</guid>
      <dc:creator>Glenn</dc:creator>
      <dc:date>2012-02-17T14:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Props/transforms rewrite of _raw is adding a blank event</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Props-transforms-rewrite-of-raw-is-adding-a-blank-event/m-p/73665#M15103</link>
      <description>&lt;P&gt;I'm totally guessing here, but the REGEX might be picking up a cr/lf after source, then inserting that into the _raw data, which is then being interpreted as a separate event. &lt;/P&gt;

&lt;P&gt;How does it work if you try:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;    REGEX = ^source::([^\r\n]+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 16:26:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Props-transforms-rewrite-of-raw-is-adding-a-blank-event/m-p/73665#M15103</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-04-12T16:26:25Z</dc:date>
    </item>
  </channel>
</rss>

