<?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 Changing sourcetype of incoming TCP syslogs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83030#M17235</link>
    <description>&lt;P&gt;Hi everyone.&lt;/P&gt;

&lt;P&gt;Quite new to the product, I am struggling a bit.
All my logs are coming through syslog on TCP 514 and I am trying to get chance the sourcetype based on the name of the service logged, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2010-11-03T16:54:26+01:00 canary.xxxxxxx.net named 17889 - - queries: info: client 127.0.0.1#57983: query: allsaintsfan-com-bk.mr.outblaze.com IN A +
2010-11-03T16:54:26+01:00 canary.xxxxxxx.net kernel - - - IPv6 addrconf: prefix with wrong length 56
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anybody point me to the right direction? So far I have:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;input.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://514]
connection_host = dns
source = syslog-tcp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::syslog-tcp]
TRANSFORMS-sourcetype = override-sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[override-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = \d{4}-?\d{2}-?\d{2}\D?\d{2}:\d{2}:\d{2}[+-]?\d{2}:\d{2}\s\S+\s(\S+)
FORMAT = sourcetype::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anybody figure out what's not working in there?
Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Nov 2010 22:59:34 GMT</pubDate>
    <dc:creator>Alexandre_Nizou</dc:creator>
    <dc:date>2010-11-03T22:59:34Z</dc:date>
    <item>
      <title>Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83030#M17235</link>
      <description>&lt;P&gt;Hi everyone.&lt;/P&gt;

&lt;P&gt;Quite new to the product, I am struggling a bit.
All my logs are coming through syslog on TCP 514 and I am trying to get chance the sourcetype based on the name of the service logged, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2010-11-03T16:54:26+01:00 canary.xxxxxxx.net named 17889 - - queries: info: client 127.0.0.1#57983: query: allsaintsfan-com-bk.mr.outblaze.com IN A +
2010-11-03T16:54:26+01:00 canary.xxxxxxx.net kernel - - - IPv6 addrconf: prefix with wrong length 56
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anybody point me to the right direction? So far I have:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;input.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://514]
connection_host = dns
source = syslog-tcp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::syslog-tcp]
TRANSFORMS-sourcetype = override-sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[override-sourcetype]
DEST_KEY = MetaData:Sourcetype
REGEX = \d{4}-?\d{2}-?\d{2}\D?\d{2}:\d{2}:\d{2}[+-]?\d{2}:\d{2}\s\S+\s(\S+)
FORMAT = sourcetype::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can anybody figure out what's not working in there?
Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2010 22:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83030#M17235</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-03T22:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83031#M17236</link>
      <description>&lt;P&gt;A problem here (and the only problem I can see with a quick glance) is specifying SOURCE_KEY in transforms.conf. I'd leave that attribute blank so that your regex matches _raw, the holder of the raw text of the event. Other than that, you should be fine if your regex matches.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2010 23:23:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83031#M17236</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2010-11-03T23:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83032#M17237</link>
      <description>&lt;P&gt;Tried removing it but not go. I also removed the sourcetype=syslog from the inputs.conf but now sourcetype is just tcp_raw.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2010 23:44:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83032#M17237</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-03T23:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83033#M17238</link>
      <description>&lt;P&gt;Also tried a simple regex to make sure problem is not about matching... Still no go &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 17:09:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83033#M17238</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-04T17:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83034#M17239</link>
      <description>&lt;P&gt;Just to make sure I am not wrong on my test procedure, is restarting the splunkd enough to apply changes made to props.conf and transforms.conf?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Nov 2010 17:11:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83034#M17239</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-04T17:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83035#M17240</link>
      <description>&lt;P&gt;Did you find an answer to your problem?  I have a similar issue, which is why I ask.  &lt;/P&gt;

&lt;P&gt;As for your configuration, are you sure your syslog messages are arriving via TCP (as opposed to UDP)?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2010 09:50:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83035#M17240</guid>
      <dc:creator>melipla</dc:creator>
      <dc:date>2010-11-11T09:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83036#M17241</link>
      <description>&lt;P&gt;Yes, my logs are coming in from TCP. I did not yet find an working answer. Hopefully you will &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2010 03:02:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83036#M17241</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-16T03:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83037#M17242</link>
      <description>&lt;P&gt;Does it work on UDP?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2010 03:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83037#M17242</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-16T03:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83038#M17243</link>
      <description>&lt;P&gt;Well I only mentioned UDP because that is what syslog uses by default (udp/514).  I think you have to use syslog-ng to see syslog over TCP (tcp/514).  &lt;/P&gt;

&lt;P&gt;I'm still working on a resolution to this.  Although I'm currently leaning towards this solution, where syslog messages are written to a file and then splunk parses the file:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/questions/8912/syslog-ng-filter-by-ip"&gt;http://answers.splunk.com/questions/8912/syslog-ng-filter-by-ip&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2010 05:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83038#M17243</guid>
      <dc:creator>melipla</dc:creator>
      <dc:date>2010-11-16T05:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Changing sourcetype of incoming TCP syslogs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83039#M17244</link>
      <description>&lt;P&gt;My syslog-ng is indeed configured to send logs as tcp flow. Parsing log files are fine, but seems to me that it is more configuration than necessary if the solution to this question could be found. &lt;BR /&gt;
There is nothing vital in changing the sourcetype though, a simple process=xxx in a search would work as well when field is properly extracted.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2010 14:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Changing-sourcetype-of-incoming-TCP-syslogs/m-p/83039#M17244</guid>
      <dc:creator>Alexandre_Nizou</dc:creator>
      <dc:date>2010-11-17T14:39:59Z</dc:date>
    </item>
  </channel>
</rss>

