<?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 query not filtered by tag command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132428#M36129</link>
    <description>&lt;P&gt;Please post the definition of your tag. The tagging would occur behind the scenes &lt;EM&gt;before&lt;/EM&gt; the rex command, so if it is depending upon the value of the rex fields (user), then you'll have to go through some other contortions to get it to work.&lt;/P&gt;</description>
    <pubDate>Fri, 19 Sep 2014 16:55:39 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2014-09-19T16:55:39Z</dc:date>
    <item>
      <title>search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132426#M36127</link>
      <description>&lt;P&gt;I have created a field using the rex command. I have partioned the field into two parts: admin and spss_user. However when I try to search for non admins (tag!=admin), I still get both admin and non_admins.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=spss earliest=-48h@h tag!=admin "Login succeeded for user" | rex field=_raw ".*Login succeeded for user: (?&amp;lt;user&amp;gt;.*)" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I replace tag!=admin with tag=admin, I get back no results. I was attempting to follow this video: &lt;A href="http://www.splunk.com/view/SP-CAAAGYJ" target="_blank"&gt;http://www.splunk.com/view/SP-CAAAGYJ&lt;/A&gt;, but I am not having any success.&lt;/P&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132426#M36127</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2020-09-28T17:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132427#M36128</link>
      <description>&lt;P&gt;When alt clicking on the tag spss_user I get the following code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=spss earliest=-48h@h "Login succeeded for user" NOT tag::user="spss_user" | rex field=_raw ".*Login succeeded for user: (?&amp;lt;user&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, when I search by this, I get back both the admin and spss_user tags&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 15:42:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132427#M36128</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2014-09-19T15:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132428#M36129</link>
      <description>&lt;P&gt;Please post the definition of your tag. The tagging would occur behind the scenes &lt;EM&gt;before&lt;/EM&gt; the rex command, so if it is depending upon the value of the rex fields (user), then you'll have to go through some other contortions to get it to work.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 16:55:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132428#M36129</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2014-09-19T16:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132429#M36130</link>
      <description>&lt;P&gt;I think you may have something there. Could it be that the tags are being called before the field user is created?&lt;/P&gt;

&lt;P&gt;I tried the below command, but it did not work, everything was returned.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=spss earliest=-48h@h "Login succeeded for user"  | rex field=_raw ".*Login succeeded for user: (?&amp;lt;user&amp;gt;.*)" | search NOT tag::user="spss_user"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 19:27:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132429#M36130</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2014-09-19T19:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132430#M36131</link>
      <description>&lt;P&gt;Yes, tags happen before your rex command is run. If you can't add this to the props for the sourcetype, add | typer after your rex, but before your search. This command evaluates eventtypes (upon which tags are based), manually, and would then act on any new fields that were made available by search commands earlier in the pipeline.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 19:38:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132430#M36131</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2014-09-19T19:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: search query not filtered by tag command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132431#M36132</link>
      <description>&lt;P&gt;Hmmm... maybe I'm not following you as closely as I thought. I tried the following command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index=spss earliest=-48h@h "Login succeeded for user"  | rex field=_raw ".*Login succeeded for user: (?&amp;lt;user&amp;gt;.*)" | typer | search NOT tag::user="spss_user"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;however, it doesn't appear that anything different has happened. I am still getting both the spss_user and the admin tags.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 20:13:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-not-filtered-by-tag-command/m-p/132431#M36132</guid>
      <dc:creator>Splunkster45</dc:creator>
      <dc:date>2014-09-19T20:13:54Z</dc:date>
    </item>
  </channel>
</rss>

