<?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: How can I escape linefeed/newline characters when forwarding Windows events to a third party via syslog? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38352#M7057</link>
    <description>&lt;P&gt;Snark alert! The + on the [class] is unnecessary.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2013 23:42:29 GMT</pubDate>
    <dc:creator>jrodman</dc:creator>
    <dc:date>2013-11-13T23:42:29Z</dc:date>
    <item>
      <title>How can I escape linefeed/newline characters when forwarding Windows events to a third party via syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38350#M7055</link>
      <description>&lt;P&gt;Windows event logs are being picked up by Universal Forwarder v5 and sent to an Indexer v5.&lt;/P&gt;

&lt;P&gt;I'm trying to forward these events to a third party for analysis. I've followed the instructions &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Deploy/Forwarddatatothird-partysystemsd"&gt;here&lt;/A&gt; and have events hitting my third party server on UDP 514.&lt;/P&gt;

&lt;P&gt;Tcpdump shows the data contains newline characters. For example: ...\nLogName=Security\nSourceName=Security\n&lt;/P&gt;

&lt;P&gt;It appears that UF picks up the newlines from the windows event log, and the built-in sourcetype creates multi-line events. But my third party server does not handle multi-line events in syslog correctly.&lt;/P&gt;

&lt;P&gt;Is there any way to have Splunk escape/replace the newlines in the event with some other character or pattern prior to sending them to the third party over syslog?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2013 02:30:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38350#M7055</guid>
      <dc:creator>ringm</dc:creator>
      <dc:date>2013-08-19T02:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I escape linefeed/newline characters when forwarding Windows events to a third party via syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38351#M7056</link>
      <description>&lt;P&gt;The windows events logs are multiline events in Splunk.&lt;/P&gt;

&lt;P&gt;There are no method to format the events when they are being forwarded. So the only options are :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;bypass splunk&lt;/STRONG&gt;&lt;BR /&gt;
collect the windows logs as syslog and send them directly to your device. (see snare and other tools)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;format the events at indextime using SEDCMD&lt;/STRONG&gt;.&lt;BR /&gt;
Collect the events with splunk, and remove the linebreaking characters at index time.&lt;BR /&gt;
The events will be forwarded as single line.&lt;BR /&gt;
But in splunk, they will lose the default formatting, and some field extractions may fail.&lt;BR /&gt;
It will have a performance cost at index time to apply the sed command.&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Disclaimer : &lt;EM&gt;This method is a workaround and the events may not be suitable for splunk existing apps and analytics.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Here is a method in props.conf for the indexers (and heavy forwarder) to achieve it for every windows events logs.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[source::*WinEventLog*] &lt;BR /&gt;
SEDCMD= s/[\n\r]/ /g&lt;BR /&gt;
 # remove all the line breaks&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 21:59:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38351#M7056</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-11-13T21:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: How can I escape linefeed/newline characters when forwarding Windows events to a third party via syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38352#M7057</link>
      <description>&lt;P&gt;Snark alert! The + on the [class] is unnecessary.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 23:42:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38352#M7057</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2013-11-13T23:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I escape linefeed/newline characters when forwarding Windows events to a third party via syslog?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38353#M7058</link>
      <description>&lt;P&gt;thanks jrod, answer edited&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2013 00:09:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-escape-linefeed-newline-characters-when-forwarding/m-p/38353#M7058</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-11-14T00:09:52Z</dc:date>
    </item>
  </channel>
</rss>

