<?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: INDEX_AND_FORWARD usage in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367827#M66841</link>
    <description>&lt;P&gt;Index and forward will not forward data in syslog format. It will forward it as Splunk Cooked data, meaning that only a Splunk HF / Indexer on the other end can process the feed.&lt;/P&gt;

&lt;P&gt;If you truly want to forward to a 3rd party receiver, I'd look at the CEF App for Splunk (&lt;A href="https://splunkbase.splunk.com/app/1847/"&gt;https://splunkbase.splunk.com/app/1847/&lt;/A&gt;). There is a custom command included that you can use to format and send messages in syslog format out of Splunk to a 3rd party receiver. &lt;/P&gt;

&lt;P&gt;The other option is here : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/Forwarding/Forwarddatatothird-partysystemsd"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/Forwarding/Forwarddatatothird-partysystemsd&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2017 07:20:54 GMT</pubDate>
    <dc:creator>esix_splunk</dc:creator>
    <dc:date>2017-05-09T07:20:54Z</dc:date>
    <item>
      <title>INDEX_AND_FORWARD usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367825#M66839</link>
      <description>&lt;P&gt;I want to (index and) forward (to a syslog endpoint) some data that goes into a particular index on my indexer cluster.&lt;/P&gt;

&lt;P&gt;These indexers mainly do not run inputs over and above the splunktcp://9997 listener as the data arrives at these indexers from universal forwarders and has in some cases already passed through a heavy forwarding layer, and some is direct to the indexers.&lt;/P&gt;

&lt;P&gt;To begin with, I want to index all data and forward none (where I am now)&lt;BR /&gt;
I want to change to indexing all data and also forwarding all data.&lt;BR /&gt;
Then I want to index some data and forward all data (reducing what is indexed to a list of regex matches).&lt;/P&gt;

&lt;P&gt;I don't quite know how to make sense of the INDEX_AND_FORWARD routing keys, they state I need to declare "_INDEX_AND_FORWARD_ROUTING=local" for my inputs, but in most cases, my inputs are not local.&lt;/P&gt;

&lt;P&gt;Also, are there any good examples of how to use INDEX_AND_FORWARD based on props/transforms matches ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367825#M66839</guid>
      <dc:creator>gavsdavs_GR</dc:creator>
      <dc:date>2020-09-29T13:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX_AND_FORWARD usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367826#M66840</link>
      <description>&lt;P&gt;hello there,&lt;BR /&gt;
quick search gives me more than 10 answers in this portal, here are 3 as an appetizer:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/412969/how-do-i-configure-my-heavy-forwarder-to-filter-an.html"&gt;https://answers.splunk.com/answers/412969/how-do-i-configure-my-heavy-forwarder-to-filter-an.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/474297/how-to-route-and-filter-data-on-the-heavy-forwarde.html"&gt;https://answers.splunk.com/answers/474297/how-to-route-and-filter-data-on-the-heavy-forwarde.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/26273/how-to-selectively-index-and-forward-with-filtering.html"&gt;https://answers.splunk.com/answers/26273/how-to-selectively-index-and-forward-with-filtering.html&lt;/A&gt;&lt;BR /&gt;
and the official splunk docs for desert:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 01:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367826#M66840</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-05-09T01:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX_AND_FORWARD usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367827#M66841</link>
      <description>&lt;P&gt;Index and forward will not forward data in syslog format. It will forward it as Splunk Cooked data, meaning that only a Splunk HF / Indexer on the other end can process the feed.&lt;/P&gt;

&lt;P&gt;If you truly want to forward to a 3rd party receiver, I'd look at the CEF App for Splunk (&lt;A href="https://splunkbase.splunk.com/app/1847/"&gt;https://splunkbase.splunk.com/app/1847/&lt;/A&gt;). There is a custom command included that you can use to format and send messages in syslog format out of Splunk to a 3rd party receiver. &lt;/P&gt;

&lt;P&gt;The other option is here : &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/Forwarding/Forwarddatatothird-partysystemsd"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/Forwarding/Forwarddatatothird-partysystemsd&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 07:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367827#M66841</guid>
      <dc:creator>esix_splunk</dc:creator>
      <dc:date>2017-05-09T07:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: INDEX_AND_FORWARD usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367828#M66842</link>
      <description>&lt;P&gt;One of the reasons we want to do this is that we don't want to index all the data that we've brought in using our UFs. As a result, I don't think the CEF app can help us.&lt;/P&gt;

&lt;P&gt;We want to send some of a particular sourcetype to a syslog destination. &lt;BR /&gt;
we want to &lt;BR /&gt;
First - Index all of it AND forward all of it.&lt;BR /&gt;
Second - Index a small amount of it AND forward all of it&lt;/P&gt;

&lt;P&gt;I think this means we need some content based filtering and I currently have this setup:&lt;BR /&gt;
outputs:&lt;BR /&gt;
{code}&lt;BR /&gt;
[syslog:Send_to_syslog_dest]&lt;BR /&gt;
type = tcp&lt;BR /&gt;
server = syslog_server:10518&lt;BR /&gt;
timestampformat = %Y-%m-%dT%H:%M:%S.%3N%z&lt;/P&gt;

&lt;P&gt;[indexAndForward]&lt;BR /&gt;
index = true&lt;BR /&gt;
selectiveIndexing = true&lt;BR /&gt;
{code}&lt;/P&gt;

&lt;P&gt;props&lt;BR /&gt;
{code}&lt;BR /&gt;
[mysourcetype]&lt;BR /&gt;
TRANSFORMS-filtering = 1-forward-all-data,6-Index-bits-of-it&lt;BR /&gt;
{code}&lt;/P&gt;

&lt;P&gt;transforms&lt;BR /&gt;
{code}&lt;BR /&gt;
[1-forward-all-data]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = _SYSLOG_ROUTING&lt;BR /&gt;
FORMAT = Send_to_syslog_dest&lt;/P&gt;

&lt;P&gt;[6-Index-bits-of-it]&lt;BR /&gt;
DEST_KEY = _INDEX_AND_FORWARD_ROUTING&lt;BR /&gt;
FORMAT = local&lt;BR /&gt;
REGEX = (?msi)\"?(some|regex|matches|for|data)\"?&lt;BR /&gt;
{code}&lt;/P&gt;

&lt;P&gt;I've heard two things which make me question whether to continue on this tack.&lt;BR /&gt;
1. That I shouldn't be trying to do this on an indexer, I should only be trying to do this on a 'heavy forwarder'&lt;BR /&gt;
2.  That I can only do this with splunktcp type 'cooked' data - as opposed to syslog format. In some cases (we have a HF layer in place) the data is arriving with us already parsed.&lt;/P&gt;

&lt;P&gt;Having said that, this sort of seems to be working (I haven't done exhaustive testing).&lt;/P&gt;

&lt;P&gt;Can someone answer the 2 questions at the end ?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/INDEX-AND-FORWARD-usage/m-p/367828#M66842</guid>
      <dc:creator>gavsdavs_GR</dc:creator>
      <dc:date>2020-09-29T13:59:46Z</dc:date>
    </item>
  </channel>
</rss>

