<?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: rewrite _raw from universal forwarder not working... in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25665#M4201</link>
    <description>&lt;P&gt;Turns out the issue I had was with a bad line break in my props.conf above the pated WinEventLog:Security stanza. Splunk stopped parsing the conf file after that, apparently. When I corrected that my original solution worked.&lt;/P&gt;

&lt;P&gt;Wish I could accept both answers since both provided (more or less) accurate info... I accepted yannK's answer though since using SEDCMD seems more deliberately designed for modifying _raw pre-indexing. Added the appropriate \ in the search for carriage-return newline ( [\r\n]+ ).&lt;/P&gt;</description>
    <pubDate>Fri, 13 Apr 2012 17:32:44 GMT</pubDate>
    <dc:creator>jeff</dc:creator>
    <dc:date>2012-04-13T17:32:44Z</dc:date>
    <item>
      <title>rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25659#M4195</link>
      <description>&lt;P&gt;I have the following stansas deployed to lightweight forwarders running Windows:&lt;/P&gt;

&lt;P&gt;&lt;U&gt;props.conf&lt;/U&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[WinEventLog:Security]&lt;BR /&gt;
TRANSFORMS-clean = windows-evtlog-sec-clean&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;U&gt;transforms.conf&lt;/U&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[windows-evtlog-sec-clean]&lt;BR /&gt;
REGEX    = ^(?ims)(.*[\r\n]+)[\r\n]+(This event |Note: ).+&lt;BR /&gt;
FORMAT   = $1&lt;BR /&gt;
DEST_KEY = _raw&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;to get rid of all of that lovely "This event is logged when..." text that the Microsoft APIs like to throw on every event. Works fairly well on lightweight forwarders.&lt;/P&gt;

&lt;P&gt;When I'm getting data from the Splunk Universal Forwarders though, these stanzas are obviously ignored- so I added the same stanzas to my indexer and expected them to get picked up there. Not so much. Is it not possible to rewrite the _raw data collected and sent from a universal forwarder?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 16:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25659#M4195</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-04-12T16:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25660#M4196</link>
      <description>&lt;P&gt;The Universal Forwarder has no python, and is not parsing the events.&lt;BR /&gt;
All the event transformation has to occur on the indexer (or heavy forwarder if any)&lt;/P&gt;

&lt;P&gt;Please move your props and transforms on the indexer, and all should be fine.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 16:53:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25660#M4196</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-04-12T16:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25661#M4197</link>
      <description>&lt;P&gt;Umm... I did. See the original post. It's not working and that's what I'm struggling with. Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 17:10:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25661#M4197</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-04-12T17:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25662#M4198</link>
      <description>&lt;P&gt;Sorry I missed this part.&lt;BR /&gt;
So the issue may be regex failing, did you tested it on splunk search, on the sourcetype with the rex command  ?&lt;/P&gt;

&lt;P&gt;Here is another possibility :&lt;/P&gt;

&lt;P&gt;use sed in props instead of regex in transforms&lt;BR /&gt;
see sedcmd&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/admin/Propsconf&lt;/A&gt; &lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
in props.conf&lt;BR /&gt;
[WinEventLog:Security]&lt;BR /&gt;
SEDCMD-cleanwindows = s/[rn]+(This event |Note: ).+//g&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 17:46:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25662#M4198</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-04-12T17:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25663#M4199</link>
      <description>&lt;P&gt;What you are trying to do is valid but it also did not work in my sandbox. From square one and understanding you just want to remove the comment line on the event, I tested your regex with a few regex tools with generic data. That regex definition did not capture the desired data in various sample events.&lt;/P&gt;

&lt;P&gt;The following works:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[windows-evtlog-sec-clean]
REGEX = ^(?ims)(.*[\r\n]+)?(?:(?:This event|Note\:).*$)
FORMAT = $1
DEST_KEY = _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In retrospect, this is an expensive operation. You are asking the Splunk Indexer to interpret each event from the Windows Event Log for Security and rewrite it. Test it and ensure you examine the performance of your indexer in relationship to the regex function and the rewrite function. If you find a negative effect in the performance caused by this exercise, it may be better off-loaded to a Light Forwarder (as opossed to a UF, which carries its own set of trade-offs).&lt;/P&gt;

&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2012 18:35:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25663#M4199</guid>
      <dc:creator>Gilberto_Castil</dc:creator>
      <dc:date>2012-04-12T18:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25664#M4200</link>
      <description>&lt;P&gt;Thanks... I've actually been doing this for years on each Windows server running a lightweight forwarder and already determined that the performance impact is negligible. I'm hoping to switch over to universal forwarder across the board (as much as possible) and this is one of the few sticking points for me. The indexers are over-scaled for our deployment so I'm not anticipating performance issues by tasking the indexers with this task, if I can get it to work.&lt;/P&gt;

&lt;P&gt;The REGEX works fine, it's the markdown in Splunk Answers that had a problem. I updated my original post with the working REGEX...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 16:46:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25664#M4200</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-04-13T16:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: rewrite _raw from universal forwarder not working...</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25665#M4201</link>
      <description>&lt;P&gt;Turns out the issue I had was with a bad line break in my props.conf above the pated WinEventLog:Security stanza. Splunk stopped parsing the conf file after that, apparently. When I corrected that my original solution worked.&lt;/P&gt;

&lt;P&gt;Wish I could accept both answers since both provided (more or less) accurate info... I accepted yannK's answer though since using SEDCMD seems more deliberately designed for modifying _raw pre-indexing. Added the appropriate \ in the search for carriage-return newline ( [\r\n]+ ).&lt;/P&gt;</description>
      <pubDate>Fri, 13 Apr 2012 17:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/rewrite-raw-from-universal-forwarder-not-working/m-p/25665#M4201</guid>
      <dc:creator>jeff</dc:creator>
      <dc:date>2012-04-13T17:32:44Z</dc:date>
    </item>
  </channel>
</rss>

