<?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: Search Head filter data from Backend in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488753#M83640</link>
    <description>&lt;P&gt;are you just a user of splunk or are you the splunk admin?  filtering data before indexing is doable and not terribly complicated, but it's not button clicks either.  And it's helpful to have an understanding of how Splunk works, which isn't often the case with new users.&lt;/P&gt;

&lt;P&gt;I would recommend reading this article:  &lt;A href="https://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;https://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F&lt;/A&gt;&lt;BR /&gt;
And if that makes enough sense, then check out splunk's docs on routing:  &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That said...assuming that you do want to filter data before it is indexed, the data is coming from a universal forwarder, going to an indexer, has a sourcetype of "xyz" and contains the literal text "user=NYZ", then try putting these settings on your indexer(s).&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xyz]
TRANSFORMS-keep_nyz_only = send_to_null_queue, keep_nyz
&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;[send_to_null_queue]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[keep_nyz]
REGEX = user=NYZ
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The concept here is that when data comes to the indexer with a sourcetype of xyz, splunk is configured to transform that data twice.  The first thing we do is set all of the data to be destined for the null queue (deleted).  Next, we go back and reset any events with that user to be destined for the indexQueue (to be indexed).  &lt;/P&gt;</description>
    <pubDate>Sat, 18 Jan 2020 14:05:08 GMT</pubDate>
    <dc:creator>maciep</dc:creator>
    <dc:date>2020-01-18T14:05:08Z</dc:date>
    <item>
      <title>Search Head filter data from Backend</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488750#M83637</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;

&lt;P&gt;I am in New Splunk,&lt;/P&gt;

&lt;P&gt;I am have Search head where I am applying Some filter like &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=xyz sourcetype=xyz User=*NYZ&lt;/STRONG&gt;*&lt;/P&gt;

&lt;P&gt;So this User=&lt;EM&gt;NYZ&lt;/EM&gt; filter , i want splunk do it for myself while getting indexed,so basically i want filter index data rather then complete data of users i am filter data to be shown for index XYZ in backend&lt;/P&gt;

&lt;P&gt;expected output without Filter should be seeen all NYZ Users&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 18:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488750#M83637</guid>
      <dc:creator>mailtosnsolutio</dc:creator>
      <dc:date>2020-01-17T18:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Search Head filter data from Backend</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488751#M83638</link>
      <description>&lt;P&gt;so basically you want to only send the data to the index based upon that user?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 19:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488751#M83638</guid>
      <dc:creator>jscraig2006</dc:creator>
      <dc:date>2020-01-17T19:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Search Head filter data from Backend</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488752#M83639</link>
      <description>&lt;P&gt;Yes ,please&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 07:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488752#M83639</guid>
      <dc:creator>mailtosnsolutio</dc:creator>
      <dc:date>2020-01-18T07:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Search Head filter data from Backend</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488753#M83640</link>
      <description>&lt;P&gt;are you just a user of splunk or are you the splunk admin?  filtering data before indexing is doable and not terribly complicated, but it's not button clicks either.  And it's helpful to have an understanding of how Splunk works, which isn't often the case with new users.&lt;/P&gt;

&lt;P&gt;I would recommend reading this article:  &lt;A href="https://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F"&gt;https://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings%3F&lt;/A&gt;&lt;BR /&gt;
And if that makes enough sense, then check out splunk's docs on routing:  &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That said...assuming that you do want to filter data before it is indexed, the data is coming from a universal forwarder, going to an indexer, has a sourcetype of "xyz" and contains the literal text "user=NYZ", then try putting these settings on your indexer(s).&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[xyz]
TRANSFORMS-keep_nyz_only = send_to_null_queue, keep_nyz
&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;[send_to_null_queue]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[keep_nyz]
REGEX = user=NYZ
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The concept here is that when data comes to the indexer with a sourcetype of xyz, splunk is configured to transform that data twice.  The first thing we do is set all of the data to be destined for the null queue (deleted).  Next, we go back and reset any events with that user to be destined for the indexQueue (to be indexed).  &lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2020 14:05:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-Head-filter-data-from-Backend/m-p/488753#M83640</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2020-01-18T14:05:08Z</dc:date>
    </item>
  </channel>
</rss>

