<?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: How do I filter events into 2 environments? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211058#M41553</link>
    <description>&lt;P&gt;I believe you would be able to achieve the same using this method   &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad#Replicate_a_subset_of_data_to_a_third-party_system" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad#Replicate_a_subset_of_data_to_a_third-party_system&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Basically, have different tcpout stanza/name for your two environment, configure props/transform in you Heavy forwarder (that's where the event processing is happening) and change the _TCP_ROUTING accordingly. Actually the example in the link is exactly what you need.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:12:30 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-29T07:12:30Z</dc:date>
    <item>
      <title>How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211055#M41550</link>
      <description>&lt;P&gt;I have an old environment (5.0) and new environment (6.2.1). I have heavy forwarders in the new environment collecting the data and forwarding to both environments. I have to keep some of the data flowing to the old environment, but I can cut off most of it to save on my license if possible. I have tried to drop the events on the old indexers, but it is not working and I think it is because it is already went through the queues on the forwarders, so it skips them on the indexers. See the "Caveats for routing and filtering structured data" &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad&lt;/A&gt; here. &lt;/P&gt;

&lt;P&gt;Below is my setup. Any thoughts on how I can accomplish this one?&lt;/P&gt;

&lt;P&gt;Heavy Forwarders: outputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcpout]
defaultGroup - prod, new
forwardedindex.filter.disable = true

[tcpout:prod]
server = server1:9997,server2:9997
autoLB = true

[tcpout:new]
server = server3:9997,server4:9997
autoLB = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried this on the indexer (server1) with no such luck. I have also tried to place this in the /etc/system/local directory and tried to use the source instead of the sourcetype. I have restarted splunk but still no luck. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;props.conf
[cisco:asa]
TRANSFORMS-set = drop_event

transforms.conf
[drop_event]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help is much appreciated. &lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211055#M41550</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-01T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211056#M41551</link>
      <description>&lt;P&gt;Do you have inputs.conf defined on the Heavy Forwarder OR it's collecting data from other Universal forwarder to send to indexers (working as Intermediate forwarder)?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211056#M41551</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-01T14:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211057#M41552</link>
      <description>&lt;P&gt;They are doing both. The main part would be the UF data but I would also like to cut back some of the syslog data that resides on the heavy forwarders as well.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:32:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211057#M41552</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-01T14:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211058#M41553</link>
      <description>&lt;P&gt;I believe you would be able to achieve the same using this method   &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad#Replicate_a_subset_of_data_to_a_third-party_system" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Routeandfilterdatad#Replicate_a_subset_of_data_to_a_third-party_system&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Basically, have different tcpout stanza/name for your two environment, configure props/transform in you Heavy forwarder (that's where the event processing is happening) and change the _TCP_ROUTING accordingly. Actually the example in the link is exactly what you need.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:12:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211058#M41553</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T07:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211059#M41554</link>
      <description>&lt;P&gt;This does involve some work but should give you 100% control on what should go where.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 14:52:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211059#M41554</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-01T14:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211060#M41555</link>
      <description>&lt;P&gt;Your regex should be .* no?&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[drop_event]&lt;BR /&gt;
REGEX = .*&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;How about putting the props and transforms on the heavy forwarder instead of the indexers?  Heavy forwarders act a bit differently from universal forwarders.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:09:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211060#M41555</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T07:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211061#M41556</link>
      <description>&lt;P&gt;Did you mean to have two [tcpout:prod] in your outputs.conf example?  I think one is supposed to be :new instead.  &lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 15:09:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211061#M41556</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-09-01T15:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211062#M41557</link>
      <description>&lt;P&gt;Yes the 2nd stanza is supposed to be :new. That is a typo on my part. Thanks for spotting that one.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 15:25:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211062#M41557</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-01T15:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211063#M41558</link>
      <description>&lt;P&gt;I need all the data to go to the new environment and if I drop the events on the heavy forwarders then it will drop it from both environments. As for the regex .* it would work the same as . in this case. I am just matching any character.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 15:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211063#M41558</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-01T15:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211064#M41559</link>
      <description>&lt;P&gt;I see your point now about putting it on the heavy forwarders.&lt;/P&gt;

&lt;P&gt;Still i believe you want to use .* otherwise you're only matching events with 1 character.  I'm not a regex expert, but would be interested in the result.&lt;/P&gt;

&lt;P&gt;Anyways... now that I know the issue... @somesoni2 has the correct answer.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 18:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211064#M41559</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2015-09-01T18:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211065#M41560</link>
      <description>&lt;P&gt;I'll expand here with some examples:&lt;/P&gt;

&lt;P&gt;Inputs.conf&lt;BR /&gt;
[batch:///opt/*.xml]&lt;BR /&gt;
move_policy = sinkhole&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype = cisco:asa&lt;BR /&gt;
index = oldCiscoIndexes&lt;BR /&gt;
_TCP_ROUTING = old_Indexers_only&lt;/P&gt;

&lt;P&gt;outputs.conf&lt;BR /&gt;
[tcpout:old_Indexers_only]&lt;BR /&gt;
server = xxx.yyy.zzz.aaa:pppp&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211065#M41560</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T07:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211066#M41561</link>
      <description>&lt;P&gt;After doing some reading I also came across this in the documentation &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Forwarddatatothird-partysystemsd"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Forwarding/Forwarddatatothird-partysystemsd&lt;/A&gt;. Under the "Forward a subset of data" section is describes what you are talking about only it forwards all the data to the first source and just the sourcetypes specified to the second source. &lt;/P&gt;

&lt;P&gt;Does this in fact forward ALL data to the first? I hope that is the case so that my new environment gets all and the old just gets a few sourcetypes specified. &lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 18:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211066#M41561</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-01T18:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211067#M41562</link>
      <description>&lt;P&gt;In that section you've referenced, they're talking about using transforms.conf to forward events that match a regex.&lt;/P&gt;

&lt;P&gt;In the example I give, you're using inputs.conf to forward every event of that stanza's type to specific indexers.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;BR /&gt;
[data source we want to send to old &amp;amp; new indexers]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype = sourcetype&lt;BR /&gt;
index = index&lt;BR /&gt;
_TCP_ROUTING = all_indexers&lt;/P&gt;

&lt;P&gt;[data source we only want to send to OLD Indexers]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype= sourcetype&lt;BR /&gt;
index = index&lt;BR /&gt;
_TCP_ROUTING = old_indexers&lt;/P&gt;

&lt;P&gt;[data source we only want to send to New Indexers]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
sourcetype= sourcetype&lt;BR /&gt;
index = index&lt;BR /&gt;
_TCP_ROUTING = new_indexers&lt;/P&gt;

&lt;P&gt;FINALLY&lt;/P&gt;

&lt;P&gt;outputs.conf to tie it all together:&lt;BR /&gt;
[tcpout:all_Indexers]&lt;BR /&gt;
server = indexer1, indexer2, indexer3, indexer4&lt;/P&gt;

&lt;P&gt;[tcpout:old_Indexers]&lt;BR /&gt;
server = indexer1, indexer2&lt;/P&gt;

&lt;P&gt;[tcpout:new_Indexers]&lt;BR /&gt;
server = indexer3, indexer4&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:12:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211067#M41562</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T07:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211068#M41563</link>
      <description>&lt;P&gt;ideally you'll add ssl compression to save bandwidth at the cost of ssl encryption being handled at the CPU level on the indexers &amp;amp; forwarders.&lt;/P&gt;

&lt;P&gt;compressed=true and specify an ssl cert for each indexer as well:&lt;/P&gt;

&lt;P&gt;[tcpout:OLD_INDEXERS]&lt;BR /&gt;
server = 10.0.0.1:8089, 10.0.0.2:8089&lt;BR /&gt;
compressed = true&lt;/P&gt;

&lt;P&gt;[tcpout-server://10.0.0.1:8089]&lt;BR /&gt;
sslCertPath = $SPLUNK_HOME/etc/apps/custom_tcpout/certs/cert.pem&lt;BR /&gt;
sslCommonNameToCheck = FQDN of cert (ex. mysplunk.mycompany.com)&lt;BR /&gt;
sslPassword = password for cert&lt;BR /&gt;
sslRootCAPath = $SPLUNK_HOME/etc/apps/custom_tcpout/certs/cacert.pem&lt;BR /&gt;
sslVerifyServerCert = true&lt;/P&gt;

&lt;P&gt;[tcpout-server://10.0.0.2:8089]&lt;BR /&gt;
sslCertPath = $SPLUNK_HOME/etc/apps/custom_tcpout/certs/cert.pem&lt;BR /&gt;
sslCommonNameToCheck = FQDN of cert (ex. mysplunk.mycompany.com)&lt;BR /&gt;
sslPassword = password for cert&lt;BR /&gt;
sslRootCAPath = $SPLUNK_HOME/etc/apps/custom_tcpout/certs/cacert.pem&lt;BR /&gt;
sslVerifyServerCert = true&lt;/P&gt;

&lt;P&gt;each indexer can have it's own unique ssl cert if you like.  The example above shows them using the same cert.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211068#M41563</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T07:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211069#M41564</link>
      <description>&lt;P&gt;So I tried this configuration and it will not work. It does in fact route the data as expected but it does not send the data to the new and old. It is either one or the other. I tried running it through 2 separate transforms as well to see if it would route to both and it would not. It routed to the last stanza in the list.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 16:01:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211069#M41564</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2015-09-02T16:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter events into 2 environments?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211070#M41565</link>
      <description>&lt;P&gt;Okay so my initial testing I think I have this working now. What I am doing is keeping the same config I have above where I am sending this to both environments. Then using the _TCP_ROUTING I am routing the sourcetypes I don't want going into my old environment back to my new. I will continue to verify this is in fact working and mark this as the accepted answer once I am sure.&lt;/P&gt;

&lt;P&gt;Here is what I currently have configured on my forwarder:&lt;/P&gt;

&lt;P&gt;outputs.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [tcpout]
 defaultGroup - prod, new
 forwardedindex.filter.disable = true

 [tcpout:prod]
 server = server1:9997,server2:9997
 autoLB = true

 [tcpout:new]
 server = server3:9997,server4:9997
 autoLB = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
TRANSFORMS-route = route_to_new_env
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[route_to_new_env]
REGEX = .
DEST_KEY = _TCP_ROUTING
FORMAT = new
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:13:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-filter-events-into-2-environments/m-p/211070#M41565</guid>
      <dc:creator>chrishatfield21</dc:creator>
      <dc:date>2020-09-29T07:13:13Z</dc:date>
    </item>
  </channel>
</rss>

