<?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 filter for field eliminating output if a specific values  (out of two) is true in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500393#M85277</link>
    <description>&lt;P&gt;Your description is unclear but if what you need is to find and &lt;CODE&gt;host&lt;/CODE&gt; that has any &lt;CODE&gt;AuthenticationMethod="Lookup"&lt;/CODE&gt; events that have not had a partner &lt;CODE&gt;AuthenticationMethod!="x509_PKI"&lt;/CODE&gt; event within 6-hours (on either side), then this will do that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="security" AND sourcetype="cisco:ise CISE_Passed_Authentications" AND HostIdentityGroup="Endpoint Identity Groups:Profiled:Workstation" AND "Device Type=Device Type#All Device Types#Network Devices#Cisco#Monitor Mode" AND Protocol!="Tacacs" AND (AuthenticationMethod="Lookup" OR AuthenticationMethod!="x509_PKI")
| streamstats time_window=6h count(eval(AuthenticationMethod="x509_PKI")) AS x509_PKI_count BY host
| search AuthenticationMethod="x509_PKI" AND x509_PCI_count=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 20 Oct 2019 22:25:35 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-10-20T22:25:35Z</dc:date>
    <item>
      <title>Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500388#M85272</link>
      <description>&lt;P&gt;I want to run a search where if AuthenticationMethod!=x509_PKI even once within 6 hours, it should not show the host (Calling_Station_ID) in the results.&lt;/P&gt;

&lt;P&gt;This should work even if the search time range is increased to 48 hours or 7 days, basically only showing hosts that have not had a AuthenticationMethod=x509_PKI and have only had a AuthenticationMethod=Lookup.&lt;/P&gt;

&lt;P&gt;With my current search, if I go back 48 hours, it shows the AuthenticationMethod=Lookup even if there was a AuthenticationMethod=x509_PKI within those hours.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=security sourcetype=cisco:ise CISE_Passed_Authentications HostIdentityGroup="Endpoint Identity Groups:Profiled:Workstation" "Device Type=Device Type#All Device Types#Network Devices#Cisco#Monitor Mode" Protocol!=Tacacs (AuthenticationMethod=Lookup AND AuthenticationMethod!=x509_PKI) 
| fields _time Calling_Station_ID User_Name NetworkDeviceName EndPointMatchedProfile AuthenticationMethod 
| eval t=(now() - _time) 
| eval tm=(t/60) 
| eval Hours_elapsed=round(tm/60,2) 
| where Hours_elapsed &amp;gt; 5.99 
| table Hours_elapsed Calling_Station_ID User_Name NetworkDeviceName EndPointMatchedProfile AuthenticationMethod 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500388#M85272</guid>
      <dc:creator>geoffmoraes</dc:creator>
      <dc:date>2020-09-30T02:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500389#M85273</link>
      <description>&lt;P&gt;The base search is looking for events where AuthenticationMethod is both "Lookup" and not "x509_PKI".  If it's "Lookup" then it can't be "x509_PKI" so there's no need to include both in the search.&lt;BR /&gt;
What you need is all events with AuthenticationMethod of "Lookup" OR "x509_PKI".  Combine them by calling station then discard those with x509_PKI.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=security sourcetype=cisco:ise CISE_Passed_Authentications HostIdentityGroup="Endpoint Identity Groups:Profiled:Workstation" "Device Type=Device Type#All Device Types#Network Devices#Cisco#Monitor Mode" Protocol!=Tacacs (AuthenticationMethod=Lookup OR AuthenticationMethod=x509_PKI) 
| fields _time Calling_Station_ID User_Name NetworkDeviceName EndPointMatchedProfile AuthenticationMethod 
| stats values(*) as * by Calling_Station_ID
| where NOT mvfind(AuthenticationMethod, "x509_PKI")
| eval t=(now() - _time) 
| eval tm=(t/60) 
| eval Hours_elapsed=round(tm/60,2) 
| where Hours_elapsed &amp;gt; 5.99 
| table Hours_elapsed Calling_Station_ID User_Name NetworkDeviceName EndPointMatchedProfile AuthenticationMethod
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:25:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500389#M85273</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-30T02:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500390#M85274</link>
      <description>&lt;P&gt;Thanks richgalloway! Yes, it makes sense to include both "Lookup" OR "x509_PKI" events.&lt;/P&gt;

&lt;P&gt;I tried your solution, and got an error...&lt;BR /&gt;
    Error in 'where' command: Typechecking failed. 'XOR' only takes boolean arguments.&lt;/P&gt;

&lt;P&gt;So then I changed it to this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=security sourcetype=cisco:ise CISE_Passed_Authentications HostIdentityGroup="Endpoint Identity Groups:Profiled:Workstation" "Device Type=Device Type#All Device Types#Network Devices#Cisco#Monitor Mode" Protocol!=Tacacs (AuthenticationMethod=Lookup OR AuthenticationMethod=x509_PKI)
| eval t=(now() - _time) 
| eval tm=(t/60) 
| eval Hours_elapsed=round(tm/60,2) 
| where Hours_elapsed &amp;gt; 5.99 
| fields Hours_elapsed Calling_Station_ID User_Name NetworkDeviceName EndPointMatchedProfile AuthenticationMethod 
| stats values(*) as * by Calling_Station_ID 
| where (AuthenticationMethod!="x509_PKI")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It seems that when piping to "stats", the _time field is taken off, so I did the _time eval before the stats.&lt;/P&gt;

&lt;P&gt;Also the "where NOT mvfind" gave no results, so I changed that to &lt;CODE&gt;| where (AuthenticationMethod!="x509_PKI")&lt;/CODE&gt; and got output with just the Lookup auths. &lt;/P&gt;

&lt;P&gt;The output is not accurate though; it still shows Lookup auths for a host even though it has had x509_PKI auths within the given search time period.&lt;/P&gt;

&lt;P&gt;Can you tell me why &lt;CODE&gt;| where NOT mvfind(AuthenticationMethod, "x509_PKI")&lt;/CODE&gt; wasn't producing any output?&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 05:07:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500390#M85274</guid>
      <dc:creator>geoffmoraes</dc:creator>
      <dc:date>2019-10-11T05:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500391#M85275</link>
      <description>&lt;P&gt;I guess &lt;CODE&gt;where&lt;/CODE&gt; does not like integer results.  Try &lt;CODE&gt;| where isnotnull(mvfind(AuthenticationMethod, "x509_PKI"))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 12:57:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500391#M85275</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-11T12:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500392#M85276</link>
      <description>&lt;P&gt;Well, &lt;CODE&gt;| where isnotnull(mvfind(AuthenticationMethod, "x509_PKI"))&lt;/CODE&gt; shows hosts that have only had x509_PKI auths; just the opposite of what is required.&lt;/P&gt;

&lt;P&gt;So I tried &lt;CODE&gt;| where isnull(mvfind(AuthenticationMethod, "x509_PKI"))&lt;/CODE&gt;, which gives the same output as &lt;CODE&gt;| where (AuthenticationMethod!="x509_PKI")&lt;/CODE&gt;. These show just the Lookup auths but even if there was a x509_PKI for that host within the past 6 hours. So, none of these give the required output.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 04:52:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500392#M85276</guid>
      <dc:creator>geoffmoraes</dc:creator>
      <dc:date>2019-10-14T04:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500393#M85277</link>
      <description>&lt;P&gt;Your description is unclear but if what you need is to find and &lt;CODE&gt;host&lt;/CODE&gt; that has any &lt;CODE&gt;AuthenticationMethod="Lookup"&lt;/CODE&gt; events that have not had a partner &lt;CODE&gt;AuthenticationMethod!="x509_PKI"&lt;/CODE&gt; event within 6-hours (on either side), then this will do that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="security" AND sourcetype="cisco:ise CISE_Passed_Authentications" AND HostIdentityGroup="Endpoint Identity Groups:Profiled:Workstation" AND "Device Type=Device Type#All Device Types#Network Devices#Cisco#Monitor Mode" AND Protocol!="Tacacs" AND (AuthenticationMethod="Lookup" OR AuthenticationMethod!="x509_PKI")
| streamstats time_window=6h count(eval(AuthenticationMethod="x509_PKI")) AS x509_PKI_count BY host
| search AuthenticationMethod="x509_PKI" AND x509_PCI_count=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 20 Oct 2019 22:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500393#M85277</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-20T22:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Search filter for field eliminating output if a specific values  (out of two) is true</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500394#M85278</link>
      <description>&lt;P&gt;Had to tweak it a bit, but this helped. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 01:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Search-filter-for-field-eliminating-output-if-a-specific-values/m-p/500394#M85278</guid>
      <dc:creator>geoffmoraes</dc:creator>
      <dc:date>2019-10-25T01:53:07Z</dc:date>
    </item>
  </channel>
</rss>

