<?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: Please help me out to filter or restrict with exact value as mentioned below? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384955#M69195</link>
    <description>&lt;P&gt;@niketnilay ,&lt;/P&gt;

&lt;P&gt;Labels,label1, label2,label3, label4 won't be available in all events. One event may contain atleast one label or may be 2, 3 labels. Max one event can contain minimum 1 labels and maximum 5 labels.  I need to fetch data only having value as "SPLUNK". Etc mean there are n number of combination value with "SPLUNK" .      I have provided little sample data here .. &lt;/P&gt;</description>
    <pubDate>Sun, 05 Aug 2018 16:30:21 GMT</pubDate>
    <dc:creator>Shan</dc:creator>
    <dc:date>2018-08-05T16:30:21Z</dc:date>
    <item>
      <title>Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384953#M69193</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;Need your help on finding a solution for below problem.. &lt;/P&gt;

&lt;P&gt;This is how my data appear in Index.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/255618-splunk-data-validation.jpg" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I want to filter only data having value like "SPLUNK" or "SPLUNK,HTSV" or "SPLUNK,CHECK" etc from all the following labels (labels,label1,label2,label3,label4). I want to exclude following data "SPLUNK-AUTOCHECK" , "SPLUNK-Mining", "DATA,SPLUNK-TRANSACTION",SPLUNK_TRANSACTION","SPLUNK-AUTO","SPLUNK_AUTO". I want to remove all the value which start with "SPLUNK-************&lt;STRONG&gt;&lt;EM&gt;" , "SPLUNK_&lt;/EM&gt;&lt;/STRONG&gt;************"&lt;BR /&gt;
I was trying to filter using the below query . But I'm unable to achieve it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=****  labels="SPLUNK" OR label1="SPLUNK" OR  label2="SPLUNK" OR  label4="SPLUNK"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When i use above query. I'm getting following values  "SPLUNK-AUTO","DATA,SPLUNK-TRANSACTION","SPLUNK","SPLUNK,HTSV","SPLUNK-AUTOCHECK" . But i need only values like "SPLUNK". &lt;/P&gt;

&lt;P&gt;I can able to achieve it with below mentioned query. But still i want to achieve it without NOT condition.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=****  labels="SPLUNK" OR label1="SPLUNK" OR  label2="SPLUNK" OR  label4="SPLUNK" NOT "SPLUNK-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks in advance... &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384953#M69193</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2020-09-29T20:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384954#M69194</link>
      <description>&lt;P&gt;@shankarananth do your events have labels, label1, label2 and label4 available in each event?&lt;/P&gt;

&lt;P&gt;In your question you have mentioned that you need values of &lt;CODE&gt;"SPLUNK" or "SPLUNK,HTSV" or "SPLUNK,CHECK" etc&lt;/CODE&gt; but in your filter you have just used &lt;CODE&gt;"SPLUNK". What is&lt;/CODE&gt;etc`? Are there fixed number of combinations or patterns?&lt;/P&gt;

&lt;P&gt;In you question you have mentioned filter to be applied on all label fields i.e. labels,label1,label2,label3,label4 but in your query label3 is not present. Is it not required for filtering?&lt;/P&gt;

&lt;P&gt;Following is a run anywhere search which generates data as per your question:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval labels="Project,SPLUNK-TRANSACTION", label1="SPLUNK-AUTO", label2="SPLUNK-AUTOCHECK",label3="SPLUNK-AUTOCHECK",label4="SPLUNK-Minig" 
| append 
    [| makeresults 
    | eval labels="SPLUNK-AUTO", label1="SPLUNK", label2="SPLUNK-Mining",label3="SPLUNK-Evaluate",label4="SPLUNK"] 
| append 
    [| makeresults 
    | eval labels="DATA,SPLUNK-TRANSACTION", label1="SPLUNK-AUTO", label2="SPLUNK-TRANSACTION,Fill",label3="SPLUNK",label4="SPLUNK,HTSV"] 
| append 
    [| makeresults 
    | eval labels="SPLUNK,HTSV", label1="SPLUNK,HTSV", label2="SPLUNK,HTSV",label3="SPLUNK,Search",label4="SPLUNK,Data mining"] 
| append 
    [| makeresults 
    | eval labels="KT,SPLUNK-HTSV", label1="SPLUNK_TRANSACTION", label2="SPLUNK",label3="SPLUNK",label4="SPLUNK,Super Store"] 
| append 
    [| makeresults 
    | eval labels="KT,SPLUNK-HTSV,htsv", label1="SPLUNK,CHECK", label2="SPLUNK,CHECK",label3="SPLUNK,CHECK",label4="SPLUNK"] 
| append 
    [| makeresults 
    | eval labels="SPLUNK", label2="SPLUNK,HTSV",label3="SPLUNK,CHECK",label4="SPLUNK_AUTO"] 
    | table labels label*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Based on your question and sample data following check will give all rows that are present in your data i.e. with filter &lt;CODE&gt;"SPLUNK","SPLUNK,HTSV","SPLUNK,CHECK"&lt;/CODE&gt; applied on &lt;CODE&gt;labels, label1, label2 and label4&lt;/CODE&gt; fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| search labels IN ( "SPLUNK","SPLUNK,HTSV","SPLUNK,CHECK" ) OR label1 IN ( "SPLUNK","SPLUNK,HTSV","SPLUNK,CHECK" ) OR label2 IN ( "SPLUNK","SPLUNK,HTSV","SPLUNK,CHECK" ) OR label4 IN ( "SPLUNK","SPLUNK,HTSV","SPLUNK,CHECK" )
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a query similar to your question with only &lt;CODE&gt;SPLUNK&lt;/CODE&gt; filter applied on &lt;CODE&gt;labels, label1, label2 and label4&lt;/CODE&gt; fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | search labels="SPLUNK" OR label1="SPLUNK" OR label2="SPLUNK" OR label4="SPLUNK"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It returns 4 of the 7 rows provided in your data. Which are the rows you think are listed incorrectly? Do you need some specific columns to be removed instead?&lt;/P&gt;

&lt;P&gt;Please add more clarification.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 09:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384954#M69194</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-05T09:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384955#M69195</link>
      <description>&lt;P&gt;@niketnilay ,&lt;/P&gt;

&lt;P&gt;Labels,label1, label2,label3, label4 won't be available in all events. One event may contain atleast one label or may be 2, 3 labels. Max one event can contain minimum 1 labels and maximum 5 labels.  I need to fetch data only having value as "SPLUNK". Etc mean there are n number of combination value with "SPLUNK" .      I have provided little sample data here .. &lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 16:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384955#M69195</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-08-05T16:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384956#M69196</link>
      <description>&lt;P&gt;@niketnilay ,&lt;/P&gt;

&lt;P&gt;Labels,label1, label2,label3, label4 won't be available in all events. One event may contain atleast one label or may be 2, 3 labels. Max one event can contain minimum 1 labels and maximum 5 labels.  I need to fetch data only having value as "SPLUNK". Etc mean there are n number of combination value with "SPLUNK" .      I have provided little sample data here .. &lt;/P&gt;</description>
      <pubDate>Sun, 05 Aug 2018 16:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384956#M69196</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-08-05T16:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384957#M69197</link>
      <description>&lt;P&gt;@niketnilay ,&lt;/P&gt;

&lt;P&gt;If you have some update. Please let me know .. &lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 11:59:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384957#M69197</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-08-06T11:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me out to filter or restrict with exact value as mentioned below?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384958#M69198</link>
      <description>&lt;P&gt;Any update on above query ?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 09:32:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Please-help-me-out-to-filter-or-restrict-with-exact-value-as/m-p/384958#M69198</guid>
      <dc:creator>Shan</dc:creator>
      <dc:date>2018-08-16T09:32:19Z</dc:date>
    </item>
  </channel>
</rss>

