<?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: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option) in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315532#M59044</link>
    <description>&lt;P&gt;There's another option:&lt;BR /&gt;
if your sources come from different hosts you could identify flows from IP address or hostname:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TCP://xx.xx.xx.xx:666]
 Disabled = 0
 index = indx_A
 sourcetype = st_A

 [TCP://yy.yy.yy.yy:666]
 Disabled = 0
 index = indx_B
 sourcetype = st_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only problem is that you must set this configuration only handly modifying conf files, because web gui gives an error.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 09 Apr 2018 06:53:37 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2018-04-09T06:53:37Z</dc:date>
    <item>
      <title>Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315528#M59040</link>
      <description>&lt;P&gt;I have a typical scenario that could be resolved with a UF on syslog-ng, however that is a future resolution.&lt;/P&gt;

&lt;P&gt;At the moment, I have 2 data sources (A and B) coming in on a common port (e.g. TCP 666).&lt;/P&gt;

&lt;P&gt;Each data source needs its own sourcetype name and reside in a different index.&lt;/P&gt;

&lt;P&gt;So far, I have been trying to follow the docs and I created the following in  .../opt/splunk/etc/system/local&lt;/P&gt;

&lt;P&gt;Inputs.conf&lt;/P&gt;

&lt;P&gt;[TCP://666]  &amp;lt;------------------- this is the original data source stanza&lt;BR /&gt;
Disabled = 0&lt;BR /&gt;
index = indx_A&lt;BR /&gt;
sourcetype = st_A&lt;/P&gt;

&lt;P&gt;Props.conf&lt;/P&gt;

&lt;P&gt;[sourcetype_B]  &amp;lt;--------------------- I added this to accomodate data source B&lt;BR /&gt;
TRANSFORMS-routing = sourcetype_B_routing&lt;/P&gt;

&lt;P&gt;Transforms.conf&lt;/P&gt;

&lt;P&gt;[sourcetype_B_routing]   &amp;lt;--------------------- I added this to accomodate data source B&lt;BR /&gt;
REGEX=|String_between_pipes|&lt;BR /&gt;
DEST_KEY=_TCP_ROUTING&lt;BR /&gt;
FORMAT=Everything, Subsidiary&lt;/P&gt;

&lt;P&gt;Outputs.conf&lt;BR /&gt;
I used two existing stanzas to direct the data to two different locations.&lt;/P&gt;

&lt;P&gt;[tcpout:Everything]   &amp;lt;----- splunk destination&lt;BR /&gt;
disabled = false&lt;BR /&gt;
server = x.x.x.x, x.x.x.x &amp;lt;---------------------I have multiple destinations&lt;BR /&gt;
autoLB = true&lt;/P&gt;

&lt;P&gt;[tcpout:Subsidiary]  &amp;lt;----------- 3rd party destination, data to be sent raw&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sendCookedData=false&lt;BR /&gt;
server = x.x.x.x:port&lt;/P&gt;

&lt;P&gt;I need some guidance on connecting the inputs to the props&amp;gt;tranforms&amp;gt;outputs.&lt;BR /&gt;&lt;BR /&gt;
How do I edit the inputs.conf stanza (or other location) to define index_B and sourcetype_B, and tie the inputs.conf to the other .confs?&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315528#M59040</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2020-09-29T18:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315529#M59041</link>
      <description>&lt;P&gt;Hi Log_wrangler,&lt;BR /&gt;
At first, if you can use different ports to send logs to Splunk you can easily manage your two inputs setting two stanzas one for each port, having in this way for each flow own index and sourcetype.&lt;BR /&gt;
In inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TCP://xx.xx.xx.xx:666]
Disabled = 0
index = indx_A
sourcetype = st_A
[TCP://yy.yy.yy.yy:667]
Disabled = 0
index = indx_B
sourcetype = st_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then if you need to send data via syslog to external systems you can see at &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.3/Forwarding/Forwarddatatothird-partysystemsd"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.3/Forwarding/Forwarddatatothird-partysystemsd&lt;/A&gt;&lt;BR /&gt;
wher you can find a guide to configure inpus.conf, props.conf, transforms.conf and outputs.conf.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 06:49:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315529#M59041</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-04-06T06:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315530#M59042</link>
      <description>&lt;P&gt;Thank you so much for the response, and if I could use different port numbers, I definitely would do exactly as your inputs.conf.  Unfortunately, both sources are coming in to the same port and I cannot define them in the source device.&lt;/P&gt;

&lt;P&gt;Is there a way to define two indexes and two source types in the inputs.conf?&lt;/P&gt;

&lt;P&gt;e.g.&lt;/P&gt;

&lt;P&gt;[TCP://666]&lt;BR /&gt;
disabled = 0&lt;/P&gt;

&lt;P&gt;then look at events, if has REGEX string - &amp;gt; send as index_B and sourcetype_B routing and everything else goes to index_A and sourcetype_A routing?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:54:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315530#M59042</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2020-09-29T18:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315531#M59043</link>
      <description>&lt;P&gt;If you can identify flows from sourceA and source B using a regular expression, you can override sourcetype and index:&lt;BR /&gt;
To override sourcetype see &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.3/Data/Advancedsourcetypeoverrides"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.3/Data/Advancedsourcetypeoverrides&lt;/A&gt;&lt;BR /&gt;
to override index try something similar on your indexer or heavy forwarder:&lt;BR /&gt;
in props.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
TRANSFORMS-index = overrideindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in transforms.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[overrideindex]
DEST_KEY =_MetaData:Index
REGEX = .
FORMAT = my_new_index
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 06:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315531#M59043</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-04-09T06:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315532#M59044</link>
      <description>&lt;P&gt;There's another option:&lt;BR /&gt;
if your sources come from different hosts you could identify flows from IP address or hostname:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TCP://xx.xx.xx.xx:666]
 Disabled = 0
 index = indx_A
 sourcetype = st_A

 [TCP://yy.yy.yy.yy:666]
 Disabled = 0
 index = indx_B
 sourcetype = st_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The only problem is that you must set this configuration only handly modifying conf files, because web gui gives an error.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 06:53:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315532#M59044</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-04-09T06:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315533#M59045</link>
      <description>&lt;P&gt;Thank you for those two options.  I understand Option 1 completely, but have a question about Option 2.&lt;/P&gt;

&lt;P&gt;Option 1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(edit confs, GUI gives errors)

inputs***************  

[TCP://xx.xx.xx.xx:666]   *OR [TCP://hostname_A.com:666]
  Disabled = 0
  index = indx_A
  sourcetype = st_A

[TCP://yy.yy.yy.yy:666]  *OR [TCP://hostname_B.com:666] 
  Disabled = 0
  index = indx_B
  sourcetype = st_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Option 2   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  inputs***************

    [TCP://666]
    Disabled = 0
    index = indx_A
    sourcetype = st_A


    props******************

   [st_B]
   TRANSFORMS-index = st_B_override


    transforms*****************

    [st_B_override]
    DEST_KEY = MetaData:Sourcetype
    REGEX=|String_between_pipes|
    FORMAT = index_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I am inferring that FORMAT = index_B  will define the index to route to in indexes.conf, but where would I define sourcetype = st_B?  Can I add ( FORMAT = st_B ) below ( FORMAT = index_B ) ?  Or do I add st_B somewhere else?  Or does splunk look back at the props stanza [st_B] and know that is the sourcetype?&lt;/P&gt;

&lt;P&gt;Hopefully that is my last question and I will accept your answer.&lt;/P&gt;

&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315533#M59045</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2020-09-29T18:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315534#M59046</link>
      <description>&lt;P&gt;Option 1 is the easiest!&lt;BR /&gt;
Anyway, there's a mistake:&lt;BR /&gt;
with DEST_KEY = MetaData:Sourcetype you override sourcetype not index so:&lt;BR /&gt;
inputs***************&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TCP://666]
Disabled = 0
index = indx_A
sourcetype = st_A
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props******************&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[st_A]
TRANSFORMS-sourcetype = sourcetype_override
TRANSFORMS-index = index_override     
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms*****************&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_override]
DEST_KEY = MetaData:Sourcetype
REGEX=|String_between_pipes|
FORMAT = st_B
[index_override]
DEST_KEY = _MetaData:Index
REGEX=|String_between_pipes|
FORMAT = index_B
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm not sure, usually I avoid to override at the same time index and sourcetype: you should test it.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 15:01:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315534#M59046</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2018-04-09T15:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Route and Filter Data from syslog (and syslog-ng is NOT an immediate option)</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315535#M59047</link>
      <description>&lt;P&gt;Ok thank you very much for the extensive answers.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 20:00:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Route-and-Filter-Data-from-syslog-and-syslog-ng-is-NOT-an/m-p/315535#M59047</guid>
      <dc:creator>Log_wrangler</dc:creator>
      <dc:date>2018-04-09T20:00:40Z</dc:date>
    </item>
  </channel>
</rss>

