<?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: Splunk to syslog with raw files in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462106#M79775</link>
    <description>&lt;P&gt;It definitely can transfer logs via syslog - I have it working for Windows logs, regular syslogs and even different files in the same directory on the original endpoint. &lt;/P&gt;

&lt;P&gt;The raw JSON file should work just like those, but it's not.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 19:41:45 GMT</pubDate>
    <dc:creator>unstable23</dc:creator>
    <dc:date>2019-10-17T19:41:45Z</dc:date>
    <item>
      <title>Splunk to syslog with raw files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462103#M79772</link>
      <description>&lt;P&gt;So here’s my situation:&lt;/P&gt;

&lt;P&gt;Multiple CentOS boxes running Suricata IDS.&lt;/P&gt;

&lt;P&gt;Suricata logs events to both:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;/opt/log/suricata/eve.json&lt;/CODE&gt; (basically raw JSON objects)&lt;/P&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;/opt/log/suricata/fast.log&lt;/CODE&gt; (a syslog style summary of events)&lt;/P&gt;

&lt;P&gt;The Suricata boxes have a UF on them to forward over the contents of those files to my indexers. That works fine - everything’s indexed and searchable and is great.&lt;/P&gt;

&lt;P&gt;However, I also need to send these same logs off via syslog to a third destination. For reasons, the easiest way to do this is to setup syslog forwarding &lt;EM&gt;on the indexers&lt;/EM&gt; (I know I can’t do it on the UFs, and indexers are basically HFs with extra stuff), which is something I’ve done before for other things and has been fine.&lt;/P&gt;

&lt;P&gt;Here’s the relevant snippets of config on the indexers:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;outputs.conf:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;PRE&gt;&lt;CODE&gt;#[syslog]
#defaultGroup = syslogtest

[syslog:syslogtest]
type = tcp
server = 10.x.x.x:9997
priority = &amp;lt;182&amp;gt;
maxEventSize = 8192
timestampformat = %b %e %H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;props.conf:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;PRE&gt;&lt;CODE&gt;#[suricata]
#[host::*SM7-Z*]
[source::/opt/log/suricata/*]
TRANSFORMS-routing=dc_suricata
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;transforms.conf:&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;PRE&gt;&lt;CODE&gt;[dc_suricata]
REGEX=SM7
DEST_KEY=_SYSLOG_ROUTING
FORMAT=syslogtest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Couple of quick notes:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Yes, I know I’m using port 9997 as the output port. That’s just me being creative with the firewall rules in place. There’s an rsyslog listening on that server on port 9997, not Splunk.&lt;/LI&gt;
&lt;LI&gt;The &lt;CODE&gt;REGEX&lt;/CODE&gt; is there in transforms to match specific hostnames. It behaves the same with &lt;CODE&gt;REGEX=.&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;With this, the events from &lt;CODE&gt;fast.log&lt;/CODE&gt; arrive on the destination syslog server just fine. However, the events from &lt;CODE&gt;eve.json&lt;/CODE&gt; do not - they’re just nowhere to be found.&lt;/P&gt;

&lt;P&gt;If I use the &lt;CODE&gt;[syslog]&lt;/CODE&gt; stanza in outputs.conf with &lt;CODE&gt;defaultGroup&lt;/CODE&gt; (the piece that’s commented out) the events &lt;EM&gt;do&lt;/EM&gt; come over, but as part of a giant flood of everything. Not great. But with the regular &lt;CODE&gt;syslog:foo&lt;/CODE&gt; stanzas, it just won’t work.&lt;/P&gt;

&lt;P&gt;Similarly, I have another application which writes its output to ‘raw’ files (but not JSON objects, just raw log data in KV pairs). Those files show up in Splunk too, but the events don’t get forwarded over when I try to send them by syslog.&lt;/P&gt;

&lt;P&gt;Any ideas? It smells like a bug to me but I don’t know if I’m missing anything.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2019 23:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462103#M79772</guid>
      <dc:creator>unstable23</dc:creator>
      <dc:date>2019-10-16T23:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to syslog with raw files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462104#M79773</link>
      <description>&lt;P&gt;The indexer cannot transfer logs like UF or HF. There is "Splunk app for CEF" as a method of transferring the indexed log.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/CEFapp/2.1.0/DeployCEFapp/AboutSplunkAppforCEF"&gt;https://docs.splunk.com/Documentation/CEFapp/2.1.0/DeployCEFapp/AboutSplunkAppforCEF&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 00:30:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462104#M79773</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-10-17T00:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to syslog with raw files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462105#M79774</link>
      <description>&lt;P&gt;Few thoughts:&lt;/P&gt;

&lt;P&gt;Have you checked whether data is forwarded using some network sniffer (e.g. tcpdump) to check whether data is being sent and received? Could also be that the receiving syslog daemon somehow doesn't like the data and drops it or so?&lt;/P&gt;

&lt;P&gt;Is that json data single line, or multiple lines per event?&lt;/P&gt;

&lt;P&gt;As an alternative, you could also consider configuring a syslog daemon on the suricata boxes, to read from file and forward to the destination syslog server.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 08:16:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462105#M79774</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2019-10-17T08:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to syslog with raw files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462106#M79775</link>
      <description>&lt;P&gt;It definitely can transfer logs via syslog - I have it working for Windows logs, regular syslogs and even different files in the same directory on the original endpoint. &lt;/P&gt;

&lt;P&gt;The raw JSON file should work just like those, but it's not.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 19:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462106#M79775</guid>
      <dc:creator>unstable23</dc:creator>
      <dc:date>2019-10-17T19:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk to syslog with raw files</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462107#M79776</link>
      <description>&lt;P&gt;I don't have access to network traffic to see if they're even being sent out of the indexers - I suspect not, because I do see them when I use the defaultGroup in the [syslog] stanza. The receiver shouldn't be an issue - I can telnet to it and type nonsense and it records it...&lt;/P&gt;

&lt;P&gt;Multiple lines per event, they're definitely large (and one of the reasons I have MaxEventSize fairly high.&lt;/P&gt;

&lt;P&gt;I could setup rsyslog on the suricata boxes, but I really want to avoid that if I can - it's not easy to manage cleanly even with Ansible and I think in the past they've had issues between syslog, systemd and the event rate... To me, this should work as I've configured it, and I'd rather try and do it this way before doing something else.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 19:45:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-to-syslog-with-raw-files/m-p/462107#M79776</guid>
      <dc:creator>unstable23</dc:creator>
      <dc:date>2019-10-17T19:45:51Z</dc:date>
    </item>
  </channel>
</rss>

