<?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: Update: problem with syslog output [Solved]filter and  route Windows event logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149431#M30436</link>
    <description>&lt;P&gt;We got this from a vendor who I think got it from the comment section here:  &lt;A href="http://blogs.splunk.com/2013/10/14/windows-event-logs-in-splunk-6/"&gt;http://blogs.splunk.com/2013/10/14/windows-event-logs-in-splunk-6/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In our props on the heavy forwarder for this sourcetype, we have the following.  It seems to format the data in a way that the target syslog server expects. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = true
MAX_TIMESTAMP_LOOKAHEAD=30
LINE_BREAKER = ([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
REPORT-MESSAGE = wel-message, wel-eq-kv, wel-col-kv
KV_MODE=none
TRANSFORMS-FIELDS = strip-winevt-linebreaker
SEDCMD-win=s/(?mis)(Token Elevation Type indicates|This event is generated|Application Id=).*$//g
SEDCMD-rmlines=s/[\n\r\t]/ /g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Aug 2015 12:59:01 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2015-08-03T12:59:01Z</dc:date>
    <item>
      <title>Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149428#M30433</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to set up a heavy forwarder that filters the received Events from a universal forwarder and other sources, send them all to another logging solution per syslog, and only a subset of logs should be sent for further use to a Splunk indexer.&lt;/P&gt;

&lt;P&gt;For now I am only experimenting with Windows event logs to get a hang of proper filtering, but it simply doesn't work.&lt;BR /&gt;
Configs on the heavy forwarder in &lt;CODE&gt;%Splunk_Home%\etc\system\local&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#no code here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Because I defined the input port for the Splunk forwarder in the Splunk Web, but it would be nice to now in what .conf file Splunk saves this port.&lt;/P&gt;

&lt;P&gt;Outputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup = nothing

[tcpout:OutSplunk]
server = &amp;lt;server&amp;gt;:&amp;lt;port&amp;gt;

[syslog:OutLogger]
server=&amp;lt;server&amp;gt;:&amp;lt;port&amp;gt;
type=tcp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
TRANSFORMS-route=WinSecEvent-Splunk,Everything

[WinEventLog:Setup]
TRANSFORMS-route=AllWinEvent-Splunk,Everything

[WinEventLog:System]
TRANSFORMS-route=AllWinEvent-Splunk,Everything

[WinEventLog:Application]
TRANSFORMS-route=AllWinEvent-Splunk,Everything
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinSecEvent-Splunk]
REGEX=(?msi)(.*Keywords=(?!Audit\sSuccess).*)
DEST_KEY=_TCP_ROUTING
FORMAT=OutSplunk

[AllWinEvent-Splunk]
REGEX=(?msi)(.*Type=(Error|Warning).*)
DEST_KEY=_TCP_ROUTING
FORMAT=OutSplunk

[Everything]
REGEX=.
DEST_KEY=_SYSLOG_ROUTING
FORMAT=OutLogger
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The syslog output somehow works, but the filtering for the Windows events not. The indexer gets all events.&lt;BR /&gt;
To check my regular expressions I use &lt;A href="https://regex101.com"&gt;https://regex101.com&lt;/A&gt; . Since splunk also uses perl compatible regular expressions (pcre), it should work in theory, but in practice the events don't get filtered.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update 03.08.2015&lt;/STRONG&gt;&lt;BR /&gt;
11:00 AM&lt;BR /&gt;
Instead of creating a new question I will ask it here&lt;BR /&gt;
 according to this site&lt;BR /&gt;
&lt;CODE&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Forwarddatatothird-partysystemsd#Syslog_data" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Forwarddatatothird-partysystemsd#Syslog_data&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;
the syslog processor of splunk creates rfc 3164 compliant output even with windows event logs but my third-party logging solution receives every line of a win event as a syslog message and not the the whole event as one message.&lt;BR /&gt;
I will try to contact the support / a splunk partner about it but maybe someone here knows the answer&lt;/P&gt;

&lt;P&gt;And by the way the filtering still doesn't work even after playing around a bit with the regex&lt;/P&gt;

&lt;P&gt;@maciep&lt;BR /&gt;
you were right, I found the config for the splunk input set in the web gui in an app&lt;BR /&gt;
it is in &lt;CODE&gt;%Splunk_Home%\etc\apps\search\local\input.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;01:00 PM&lt;/P&gt;

&lt;P&gt;@MuS&lt;BR /&gt;
thanks for the answer that solved the problem with the filtering&lt;BR /&gt;
I thought that you define a default group for events and messages where you don't have routing rules, so that everything that doesn't have a stanza in props.conf and transforms.conf still gets routed to an default indexer.&lt;BR /&gt;
By the way &lt;STRONG&gt;all data has to be routed to the third party system&lt;/STRONG&gt; and a copy of a subset to splunk&lt;/P&gt;

&lt;P&gt;Ok now I still have the problem with the syslog output that is s clearly not rfc 3164 conform&lt;BR /&gt;
I tested it now with two different third party systems and in both every line of an windows event is received as one syslog message.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update 04.08.2015&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;9:00 AM&lt;/P&gt;

&lt;P&gt;@maciep&lt;/P&gt;

&lt;P&gt;that works by adding this line to every stanza of the windows events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-rmlines=s/[\n\r\t]/ /g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the events as one liner to the third party system but now I also get every thing as one line to splunk&lt;BR /&gt;
is there maybe a way to remove the line breaks in the Everything stanza of transforms.conf or do I really need a another splunk instance to convert windows event logs to syslog before forwarding the message because the syslog processor doesn't create proper output&lt;/P&gt;

&lt;P&gt;thanks in advance for the help&lt;BR /&gt;
Ludwig_mdc&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 12:28:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149428#M30433</guid>
      <dc:creator>Ludwig_MDC</dc:creator>
      <dc:date>2015-07-30T12:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149429#M30434</link>
      <description>&lt;P&gt;If you're asking about the receiving port for the heavy forwarder, check inputs.conf.  But since you set it in the GUI, it will likely be in one of your apps - like launcher or search etc.  It won't be in system/local.&lt;/P&gt;

&lt;P&gt;For your config, I would think everything would only be getting sent to the syslog server, so I'm obviously no help there.  I'm working on a similar project and have been struggling with routing from a heavy forwarder, so a lot to learn yet there for me.  But I do have a ticket open with Splunk so if I gain a better understanding and can apply here as well, I'll follow at that time.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jul 2015 15:43:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149429#M30434</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2015-07-30T15:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149430#M30435</link>
      <description>&lt;P&gt;Hi Ludwig_MDC,&lt;/P&gt;

&lt;P&gt;Your Splunk sends everything to the third party server because you use the &lt;CODE&gt;defaultGroup&lt;/CODE&gt; in your &lt;CODE&gt;outputs.conf&lt;/CODE&gt; see the docs for details &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;defaultGroup = &amp;lt;target_group&amp;gt;, &amp;lt;target_group&amp;gt;, ...
* The forwarder sends all data to the specified groups.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2015 09:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149430#M30435</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-08-03T09:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149431#M30436</link>
      <description>&lt;P&gt;We got this from a vendor who I think got it from the comment section here:  &lt;A href="http://blogs.splunk.com/2013/10/14/windows-event-logs-in-splunk-6/"&gt;http://blogs.splunk.com/2013/10/14/windows-event-logs-in-splunk-6/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;In our props on the heavy forwarder for this sourcetype, we have the following.  It seems to format the data in a way that the target syslog server expects. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE = true
MAX_TIMESTAMP_LOOKAHEAD=30
LINE_BREAKER = ([\r\n](?=\d{2}/\d{2}/\d{2,4} \d{2}:\d{2}:\d{2} [aApPmM]{2}))
REPORT-MESSAGE = wel-message, wel-eq-kv, wel-col-kv
KV_MODE=none
TRANSFORMS-FIELDS = strip-winevt-linebreaker
SEDCMD-win=s/(?mis)(Token Elevation Type indicates|This event is generated|Application Id=).*$//g
SEDCMD-rmlines=s/[\n\r\t]/ /g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Aug 2015 12:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149431#M30436</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2015-08-03T12:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149432#M30437</link>
      <description>&lt;P&gt;It is unnecessary (maybe even problematic) to update your question's subject-line to indicate a solution.  Just add the solution as an "Answer" (not a "Comment") and then click "Accept" on your Answer to close out the question and let others know that there is a validated solution.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2015 15:01:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149432#M30437</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-04T15:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149433#M30438</link>
      <description>&lt;P&gt;it works but you will also get single line windows events in the splunk indexer&lt;BR /&gt;
therefore I am a bit disappointed that splunk an enterprise logging solution that claims in its documentation to be able to create rfc 3164 compliant syslog output even with event logs&lt;BR /&gt;
´&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Forwarddatatothird-partysystemsd#Syslog_data%C2%B4"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.4/Forwarding/Forwarddatatothird-partysystemsd#Syslog_data´&lt;/A&gt;&lt;BR /&gt;
or does that only work if you have the heavy forwarder on every system instead of an universal forwarder&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2015 06:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149433#M30438</guid>
      <dc:creator>Ludwig_MDC</dc:creator>
      <dc:date>2015-08-05T06:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update: problem with syslog output [Solved]filter and  route Windows event logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149434#M30439</link>
      <description>&lt;P&gt;I do not see an answer here. Why was it closed?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Dec 2018 20:26:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Update-problem-with-syslog-output-Solved-filter-and-route/m-p/149434#M30439</guid>
      <dc:creator>campbellj1977</dc:creator>
      <dc:date>2018-12-21T20:26:31Z</dc:date>
    </item>
  </channel>
</rss>

