<?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: is my syslog-ng wrong ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/is-my-syslog-ng-wrong/m-p/684123#M114187</link>
    <description>&lt;P&gt;I tried to copy-paste your chinese text to google translate to understand what you want to accomplish, but I am not sure the translation is correct:&lt;/P&gt;&lt;P&gt;"&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I want to use syslog-ng to input data from the universal forwarder to my search head&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I'm going to use TCP but I don't know what's wrong and I can't display my data in the search header&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;your syslog-ng seems to be receiving syslog data on port 514 and then delivering the data to 10001/10002 TCP depending on the source IP while doing some transformation. Is 10001 and 10002 where your search heads are? Or are those ports opened by UF?&lt;/P&gt;&lt;P&gt;Usually the easiest way to send syslog data to Splunk is by using HEC (HTTP Event Collector), and if you were using that you can simply assign host/source/sourcetype to a specific log message, no need to use separate ports.&lt;/P&gt;&lt;P&gt;Also, you are manually getting rid of the priority header (e.g. removing &amp;lt;NNN&amp;gt; in the front), but that would be taken care of by the actual syslog parser in syslog-ng that you disabled via flags(no-parse).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 13 Apr 2024 04:50:47 GMT</pubDate>
    <dc:creator>Bazsi771</dc:creator>
    <dc:date>2024-04-13T04:50:47Z</dc:date>
    <item>
      <title>is my syslog-ng wrong ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-my-syslog-ng-wrong/m-p/681326#M113836</link>
      <description>&lt;P&gt;我想使用 syslog-ng 將資料從&lt;SPAN&gt;通用轉寄器輸入到我的搜尋頭 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;我將使用 TCP，但我不知道哪裡出了問題，我無法在搜索頭中顯示我的數據&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-align-justify"&gt;&lt;SPAN&gt;這是我的syslog-ng splunk.conf&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;template syslog {
        template("${DATE} ${HOST} ${MESSAGE}\n");
};

rewrite rewrite_stripping_priority {
        subst("^\&amp;lt;\\d+&amp;gt;", "", value(MESSAGE));
};

source src_udp_514 {
        udp(ip("0.0.0.0")  so_rcvbuf(16777216) keep_timestamp(yes) flags(no-parse));
};

destination dest_tcp_10001 {
        tcp("127.0.0.1" port(10001) template("syslog"));
};

filter f_linux_server {
        netmask(172.18.0.8/32)
};

destination dest_tcp_10002 {
        tcp("127.0.0.1" port(10002) template("syslog"));
};

filter f_linux_server2 {
        netmask(172.18.0.9/32)
};

log {
        source(src_udp_514);
        rewrite(rewrite_stripping_priority);
        if (filter(f_linux_server)) {
                destination(dest_tcp_10001);
        }
        elif (filter(f_linux_server2)) {
                destination(dest_tcp_10002);
        };
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;&lt;SPAN&gt;i also already set tcp 10001 and 10002 on my&amp;nbsp;universal forwarder&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 08:28:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-my-syslog-ng-wrong/m-p/681326#M113836</guid>
      <dc:creator>ryanaa</dc:creator>
      <dc:date>2024-03-20T08:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: is my syslog-ng wrong ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/is-my-syslog-ng-wrong/m-p/684123#M114187</link>
      <description>&lt;P&gt;I tried to copy-paste your chinese text to google translate to understand what you want to accomplish, but I am not sure the translation is correct:&lt;/P&gt;&lt;P&gt;"&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I want to use syslog-ng to input data from the universal forwarder to my search head&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I'm going to use TCP but I don't know what's wrong and I can't display my data in the search header&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;your syslog-ng seems to be receiving syslog data on port 514 and then delivering the data to 10001/10002 TCP depending on the source IP while doing some transformation. Is 10001 and 10002 where your search heads are? Or are those ports opened by UF?&lt;/P&gt;&lt;P&gt;Usually the easiest way to send syslog data to Splunk is by using HEC (HTTP Event Collector), and if you were using that you can simply assign host/source/sourcetype to a specific log message, no need to use separate ports.&lt;/P&gt;&lt;P&gt;Also, you are manually getting rid of the priority header (e.g. removing &amp;lt;NNN&amp;gt; in the front), but that would be taken care of by the actual syslog parser in syslog-ng that you disabled via flags(no-parse).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Apr 2024 04:50:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/is-my-syslog-ng-wrong/m-p/684123#M114187</guid>
      <dc:creator>Bazsi771</dc:creator>
      <dc:date>2024-04-13T04:50:47Z</dc:date>
    </item>
  </channel>
</rss>

