<?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 do you filter data from a log and send them to 2 splunk instances while discarding the rest? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502670#M85628</link>
    <description>&lt;P&gt;I'm trying to filter data from a log and send them to 2 splunk instances while discarding the rest. &lt;BR /&gt;
I've tried a little different config but can't quite get it to work.&lt;/P&gt;

&lt;P&gt;Here is my props.conf and transforms.conf&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[cisco:estreamer:data]&lt;BR /&gt;
TRANSFORMS-estreamrouting=estreamDiscard,estreamKeep,estreamRouting1,estreamRouting2&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[estreamDiscard]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[estreamKeep]&lt;BR /&gt;
REGEX = .&lt;EM&gt;1.&lt;/EM&gt;|.&lt;EM&gt;2.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;[estreamRouting1]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .&lt;EM&gt;1.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Old&lt;/P&gt;

&lt;P&gt;[estreamRouting2]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .&lt;EM&gt;2.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Test&lt;/P&gt;

&lt;P&gt;I have tried various discards and regex filters but i always get 2 results:&lt;/P&gt;

&lt;P&gt;Data discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk Instanse 2 : No Data&lt;BR /&gt;
OR&lt;BR /&gt;
Data Discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk instanse 2 : Data 1 and 2&lt;/P&gt;

&lt;P&gt;Wanted Result:&lt;BR /&gt;
Data Discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk instanse 2 : Data 2&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:17:30 GMT</pubDate>
    <dc:creator>melvinfuglem</dc:creator>
    <dc:date>2020-09-30T03:17:30Z</dc:date>
    <item>
      <title>How do you filter data from a log and send them to 2 splunk instances while discarding the rest?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502670#M85628</link>
      <description>&lt;P&gt;I'm trying to filter data from a log and send them to 2 splunk instances while discarding the rest. &lt;BR /&gt;
I've tried a little different config but can't quite get it to work.&lt;/P&gt;

&lt;P&gt;Here is my props.conf and transforms.conf&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[cisco:estreamer:data]&lt;BR /&gt;
TRANSFORMS-estreamrouting=estreamDiscard,estreamKeep,estreamRouting1,estreamRouting2&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[estreamDiscard]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[estreamKeep]&lt;BR /&gt;
REGEX = .&lt;EM&gt;1.&lt;/EM&gt;|.&lt;EM&gt;2.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;[estreamRouting1]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .&lt;EM&gt;1.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Old&lt;/P&gt;

&lt;P&gt;[estreamRouting2]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .&lt;EM&gt;2.&lt;/EM&gt;&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Test&lt;/P&gt;

&lt;P&gt;I have tried various discards and regex filters but i always get 2 results:&lt;/P&gt;

&lt;P&gt;Data discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk Instanse 2 : No Data&lt;BR /&gt;
OR&lt;BR /&gt;
Data Discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk instanse 2 : Data 1 and 2&lt;/P&gt;

&lt;P&gt;Wanted Result:&lt;BR /&gt;
Data Discard: OK&lt;BR /&gt;
Splunk instanse 1 : Data 1 &lt;BR /&gt;
Splunk instanse 2 : Data 2&lt;/P&gt;

&lt;P&gt;Any tips?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:17:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502670#M85628</guid>
      <dc:creator>melvinfuglem</dc:creator>
      <dc:date>2020-09-30T03:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do you filter data from a log and send them to 2 splunk instances while discarding the rest?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502671#M85629</link>
      <description>&lt;P&gt;Could you share a little more about your environment?  Are you deploying this configuration on a HF and trying to send to two different indexers?&lt;BR /&gt;
Can you also share your &lt;STRONG&gt;outputs.conf&lt;/STRONG&gt; with your &lt;STRONG&gt;tcpout&lt;/STRONG&gt; definitions?&lt;/P&gt;

&lt;P&gt;Another idea is if you define an index for each different data type on a &lt;STRONG&gt;specific&lt;/STRONG&gt; instance, you could route by index.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[estreamRouting1]
REGEX = .1.
DEST_KEY = _MetaData:Index
FORMAT = &amp;lt;index_on_instance1&amp;gt;

[estreamRouting2]
REGEX = .2.
DEST_KEY = _MetaData:Index
FORMAT = &amp;lt;index_on_instance2&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Dec 2019 17:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502671#M85629</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2019-12-09T17:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do you filter data from a log and send them to 2 splunk instances while discarding the rest?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502672#M85630</link>
      <description>&lt;P&gt;I am configuring this on a HF and we are trying to forward this to 2 other splunk instances owned by other companies while not sending it to our own splunk instance. &lt;/P&gt;

&lt;P&gt;My tcpout definitions look like this:&lt;/P&gt;

&lt;P&gt;[tcpout]&lt;BR /&gt;
defaultGroup = splunkInternal1&lt;/P&gt;

&lt;P&gt;[tcpout: splunkInternal1]&lt;BR /&gt;
server = IP:9998, IP:9998&lt;/P&gt;

&lt;P&gt;[tcpout:Splunk_Old]&lt;BR /&gt;
server = IP:9997&lt;/P&gt;

&lt;P&gt;[tcpout:Splunk_Test]&lt;BR /&gt;
server = IP:9997&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 08:14:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502672#M85630</guid>
      <dc:creator>melvinfuglem</dc:creator>
      <dc:date>2019-12-10T08:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do you filter data from a log and send them to 2 splunk instances while discarding the rest?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502673#M85631</link>
      <description>&lt;P&gt;Thanks. How did you change the configuration between the two different results you mentioned above?&lt;BR /&gt;
Have you run btool to ensure each piece of the configuration is being applied?&lt;/P&gt;

&lt;P&gt;Could you also share a few sample events with the data you're filtering by?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 15:18:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502673#M85631</guid>
      <dc:creator>oscar84x</dc:creator>
      <dc:date>2019-12-10T15:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you filter data from a log and send them to 2 splunk instances while discarding the rest?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502674#M85632</link>
      <description>&lt;P&gt;sorry for late answer, but i found the problem. One of the splunk instances i was testing on was configured as a search head on the other splunk instance. &lt;/P&gt;

&lt;P&gt;This worked.&lt;/P&gt;

&lt;P&gt;[estreamRouting1]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .1.&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Old&lt;/P&gt;

&lt;P&gt;[estreamRouting2]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .2.&lt;BR /&gt;
DEST_KEY = _TCP_ROUTING&lt;BR /&gt;
FORMAT = Splunk_Test&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-you-filter-data-from-a-log-and-send-them-to-2-splunk/m-p/502674#M85632</guid>
      <dc:creator>melvinfuglem</dc:creator>
      <dc:date>2020-09-30T03:58:13Z</dc:date>
    </item>
  </channel>
</rss>

