<?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 How to send syslog-ng messages to Splunk properly? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24056#M3780</link>
    <description>&lt;P&gt;How to send syslog-ng messages to Splunk properly?
I'm using Free 'splunk-4.1.4-82143-linux-2.6-intel.deb' and 'syslog-ng 2.0.9-4.1' on Debian Lenny. Both are installed on the same machine, one host, small server. 
I want Splunk to read from syslog-ng.&lt;/P&gt;

&lt;P&gt;I have read so many articles on how to send syslog-ng to Splunk and still feel lost and very frustrated as information is either outdated, contradicts another article, is for Windows, or is incomplete- one exmaple of many &lt;A href="http://www.splunk.com/wiki/Deploy:CreateSyslogNGRules" rel="nofollow"&gt;http://www.splunk.com/wiki/Deploy:CreateSyslogNGRules&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So far the methods I think to do this are either:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Create a pipe mkfifo from syslog-ng to splunk? - I read splunk doesn't recommend the usage of fifo &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add the syslog log to Manager -&amp;gt;Data inputs-&amp;gt;TCP/Add new/select source type: From list/select source type from list: syslog/ Index select main (there isn't 'default' on the list), done? I don't need to add anything to syslog-ng?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add the syslog log to Manager -&amp;gt;Data inputs-&amp;gt;File &amp;amp; directories-&amp;gt;Add new -&amp;gt; /var/log/syslog Index select main, add /var/log/*.log , done?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Forwarder ? (wouldn't this be only for sending to another machine) and TCP forwarding only works in Enterprise edition?
Manager-&amp;gt;Fowarding and receiving-&amp;gt;Receive data-&amp;gt;Add new, enter 514 and be done with it? I don't need to add anything to syslog-ng or /opt/splunk/etc/system/local/inputs.conf?&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Please if you could tell me the best and correct method for my setup.&lt;/P&gt;

&lt;P&gt;Thank you,
Katey&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2010 15:20:13 GMT</pubDate>
    <dc:creator>Katey</dc:creator>
    <dc:date>2010-08-02T15:20:13Z</dc:date>
    <item>
      <title>How to send syslog-ng messages to Splunk properly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24056#M3780</link>
      <description>&lt;P&gt;How to send syslog-ng messages to Splunk properly?
I'm using Free 'splunk-4.1.4-82143-linux-2.6-intel.deb' and 'syslog-ng 2.0.9-4.1' on Debian Lenny. Both are installed on the same machine, one host, small server. 
I want Splunk to read from syslog-ng.&lt;/P&gt;

&lt;P&gt;I have read so many articles on how to send syslog-ng to Splunk and still feel lost and very frustrated as information is either outdated, contradicts another article, is for Windows, or is incomplete- one exmaple of many &lt;A href="http://www.splunk.com/wiki/Deploy:CreateSyslogNGRules" rel="nofollow"&gt;http://www.splunk.com/wiki/Deploy:CreateSyslogNGRules&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So far the methods I think to do this are either:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Create a pipe mkfifo from syslog-ng to splunk? - I read splunk doesn't recommend the usage of fifo &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add the syslog log to Manager -&amp;gt;Data inputs-&amp;gt;TCP/Add new/select source type: From list/select source type from list: syslog/ Index select main (there isn't 'default' on the list), done? I don't need to add anything to syslog-ng?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add the syslog log to Manager -&amp;gt;Data inputs-&amp;gt;File &amp;amp; directories-&amp;gt;Add new -&amp;gt; /var/log/syslog Index select main, add /var/log/*.log , done?&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Forwarder ? (wouldn't this be only for sending to another machine) and TCP forwarding only works in Enterprise edition?
Manager-&amp;gt;Fowarding and receiving-&amp;gt;Receive data-&amp;gt;Add new, enter 514 and be done with it? I don't need to add anything to syslog-ng or /opt/splunk/etc/system/local/inputs.conf?&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Please if you could tell me the best and correct method for my setup.&lt;/P&gt;

&lt;P&gt;Thank you,
Katey&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2010 15:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24056#M3780</guid>
      <dc:creator>Katey</dc:creator>
      <dc:date>2010-08-02T15:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to send syslog-ng messages to Splunk properly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24057#M3781</link>
      <description>&lt;P&gt;Katey, solution 3 you posted sounds best.&lt;/P&gt;

&lt;P&gt;Basically you would want to set up syslog-ng on your splunk server and index the log files it generates. Point your managed hosts to send syslog to the syslog-ng instance on your splunk server and you're done.&lt;/P&gt;

&lt;P&gt;I recommend configuring syslog-ng to create a log file per host, preferably in a directory structure that identifies the host:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/var/log/syslog-ng/hostA/logfile.log
/var/log/syslog-ng/hostB/logfile.log
/var/log/syslog-ng/hostC/logfile.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then when configuring your &lt;A href="http://www.splunk.com/base/Documentation/latest/Admin/Monitorfilesanddirectories" rel="nofollow"&gt;monitor&lt;/A&gt;, set the host to be dynamically defined based on a segment in the path (in this case segment 4). Check out &lt;A href="http://www.splunk.com/base/Documentation/latest/Admin/Setadefaulthostforaninput#Dynamically_setting_the_default_host_value_for_a_file_or_directory_input" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Admin/Setadefaulthostforaninput#Dynamically_setting_the_default_host_value_for_a_file_or_directory_input&lt;/A&gt; for more info.&lt;/P&gt;

&lt;P&gt;Hope this will get you down the right track.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2010 20:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24057#M3781</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-08-02T20:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to send syslog-ng messages to Splunk properly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24058#M3782</link>
      <description>&lt;P&gt;Thank you ftk very much for your reply. 
I think this shouldn't be as hard as I've made it.
I want syslog-ng to send to Splunk also - presently syslog-ng sends to logs it writes to &amp;amp; sends to MySQL for LogZilla. I use LogZilla and it was as easy as just installing it - LogZilla added its own entries to syslog-ng.conf.&lt;/P&gt;

&lt;P&gt;I understand the adding the files (solution 3) but I have it in my mind somehow I'm suppose to have syslog-ng feed directly to Splunk as I was doing with the fifo (not add log by log (clone)) . 
So I thought then I must send syslog-ng directly to Splunk via TCP port and it will sort out what goes where (instead of reading all the logs in /var/log) :/.
Does that make sense? &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;You replied:&lt;/P&gt;

&lt;P&gt;"Point your managed hosts to send syslog to the syslog-ng" &amp;lt;-I'm not using syslog I believe, I'm using only syslog-ng and syslog-ng is working.&lt;/P&gt;

&lt;P&gt;"configuring syslog-ng to create a log file per host" &amp;lt;- I have only one host/server/IP- just the box it is installed on, so I don't believe I need to do this?&lt;/P&gt;

&lt;P&gt;"And then when configuring your monitor, set the host to be dynamically defined based on a segment in the path (in this case segment 4)" &amp;lt;-Tho I have only one host/IP I should still do this?: Set host: segment in path, Segment #: 4&lt;/P&gt;

&lt;P&gt;Thank you again ftk &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2010 14:45:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24058#M3782</guid>
      <dc:creator>Katey</dc:creator>
      <dc:date>2010-08-03T14:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to send syslog-ng messages to Splunk properly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24059#M3783</link>
      <description>&lt;P&gt;Katey, in one of my environments I have a similar setup and I would recommend that you go with proposal 3. (Add the syslog log to Manager -&amp;gt;Data inputs-&amp;gt;File &amp;amp; directories-&amp;gt;Add new -&amp;gt; /var/log/syslog).&lt;/P&gt;

&lt;P&gt;You dont have to configure the whitelist regex.&lt;/P&gt;

&lt;P&gt;The advantage of this approach is that Splunk will automatically monitor /var/log/syslog and in the event of Splunk ever stopping (for example because of a reboot) it will be able to continue where it left off, it automatically keeps track of it's progress when in this mode.&lt;/P&gt;

&lt;P&gt;Adding a forwarder is just adding complexity and overhead.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2010 16:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24059#M3783</guid>
      <dc:creator>stephanbuys</dc:creator>
      <dc:date>2010-08-03T16:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to send syslog-ng messages to Splunk properly?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24060#M3784</link>
      <description>&lt;P&gt;Thank you stephanbuys. I feel more confident knowing others use this same method then. 
I have added these logs, no regex, segment 4, main index, auto detect type all except syslog I added under file list as syslog (didn't know if the others should be under syslog as well):
/var/log/auth.log
/var/log/cron.log
/var/log/daemon.log
/var/log/debug
/var/log/kern.log
/var/log/mail.err
/var/log/mail.log
/var/log/messages
/var/log/syslog
/var/log/user.log
/var/log/uucp.log&lt;/P&gt;

&lt;P&gt;Since those are the ones syslog-ng writes.&lt;/P&gt;

&lt;P&gt;Thank you again :))&lt;/P&gt;</description>
      <pubDate>Tue, 03 Aug 2010 16:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-send-syslog-ng-messages-to-Splunk-properly/m-p/24060#M3784</guid>
      <dc:creator>Katey</dc:creator>
      <dc:date>2010-08-03T16:58:50Z</dc:date>
    </item>
  </channel>
</rss>

