<?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: How to search for the latest field value that is not equal to a certain value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468288#M131841</link>
    <description>&lt;P&gt;nope does not look at the time, does not retain the time comparison of the final_action events... have to rewrite...&lt;/P&gt;</description>
    <pubDate>Wed, 04 Sep 2019 20:54:48 GMT</pubDate>
    <dc:creator>Glasses</dc:creator>
    <dc:date>2019-09-04T20:54:48Z</dc:date>
    <item>
      <title>How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468276#M131829</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
Just not having luck with my syntax.&lt;BR /&gt;
I have proofpoint logs and I am looking for the latest final_action value that is not equal to continue...&lt;BR /&gt;
For example&lt;BR /&gt;
&lt;CODE&gt;Index=Proofpoint sourcetype=mail_logs | stats latest(final_action)&lt;/CODE&gt;  gives me the last value... like if it was rejected or continued&lt;BR /&gt;
The challenge I have is searching for latest &lt;CODE&gt;final_action != continue&lt;/CODE&gt;... &lt;BR /&gt;
The purpose here is that the final action can change from "discard" to "continue" so I want to filter on the "latest"...&lt;/P&gt;

&lt;P&gt;Any advice appreciated...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468276#M131829</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2020-09-30T01:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468277#M131830</link>
      <description>&lt;P&gt;try this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index=Proofpoint sourcetype=mail_logs final_action!=continue | stats latest(final_action)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Index=Proofpoint sourcetype=mail_logs 
| stats latest(eval(case(final_action!="continue",final_action))) as "final_action"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 17:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468277#M131830</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-09-04T17:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468278#M131831</link>
      <description>&lt;P&gt;Thank you for the reply but neither are what I am looking for...&lt;BR /&gt;
There are multiple events per email that contain "final_action",  if an event with final_action=discard arrives at 10:41  another event for the same email can arrive later at 10:42 where final_action=continue, this is because there are a sequence of filters checking the email...&lt;BR /&gt;
So I only want to find emails where the last or latest final_action!=continue...&lt;BR /&gt;
Hope that makes sense... thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468278#M131831</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2020-09-30T02:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468279#M131832</link>
      <description>&lt;P&gt;what I am trying to do is use this &lt;BR /&gt;
    index=proofpoint sourcetype=mail "&lt;EM&gt;@somedomain.com" "connection.helo"="&lt;/EM&gt;.somename.com"|stats latest(final_action) by msg.header.subject{} msg.header.to{}  msg.header.from{}&lt;/P&gt;

&lt;P&gt;which gives me all the emails with the latest final_action value.... but now I need to filter out any final_action which is discard , reject etc... &lt;/P&gt;

&lt;P&gt;any advice appreciated...  Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468279#M131832</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2020-09-30T02:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468280#M131833</link>
      <description>&lt;P&gt;so you could add the &lt;CODE&gt;actions&lt;/CODE&gt; that you want in the main search. final_action="discard" OR final_action="reject" OR...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468280#M131833</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2020-09-30T02:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468281#M131834</link>
      <description>&lt;P&gt;apparently this works but I don't know if its the best way.... &lt;CODE&gt;index=proofpoint sourcetype=mail "@somedomain.com" "connection.helo"=".somename.com"|stats latest(final_action) by msg.header.subject{} msg.header.to{} msg.header.from{} |WHERE final_action!="continue"&lt;/CODE&gt;  &lt;/P&gt;

&lt;P&gt;if anyone can confirm or improve, it is much appreciated...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468281#M131834</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2019-09-04T20:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468282#M131835</link>
      <description>&lt;P&gt;This is the best way. &lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:31:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468282#M131835</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2019-09-04T20:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468283#M131836</link>
      <description>&lt;P&gt;If you want to blacklist multiple final_actions, you could do:&lt;BR /&gt;
&lt;CODE&gt;index=proofpoint sourcetype=mail "@somedomain.com" "connection.helo"=".somename.com"|stats latest(final_action) as final_action by msg.header.subject{} msg.header.to{} msg.header.from{} | search NOT final_action IN (continue, discard, reject)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:03:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468283#M131836</guid>
      <dc:creator>masonmorales</dc:creator>
      <dc:date>2020-09-30T02:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468284#M131837</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=proofpoint sourcetype=mail "@somedomain.com" "connection.helo"=".somename.com" final_action!="continue" |stats latest(final_action) by msg.header.subject{} msg.header.to{} msg.header.from{}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;this will be faster&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468284#M131837</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-09-04T20:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468285#M131838</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172209"&gt;@mayurr98&lt;/a&gt; thank you but if I define final_action!=continue then I might not get the latest final_action values.  Each email has more than one final_action but the last or latest one indicates where it continued to deliver or got dropped /discarded...  I appreciate you stay with the thread though...&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:04:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468285#M131838</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2020-09-30T02:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468286#M131839</link>
      <description>&lt;P&gt;then filtering at the end is the only option&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:50:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468286#M131839</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-09-04T20:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468287#M131840</link>
      <description>&lt;P&gt;my only improvement I might need is defining the latest(final_action) as FINAL so that it looks at the values for the latest...  but IDK - still validating&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....| stats  latest(final_action) as FINAL  by _time msg.header.subject{} msg.header.to{}  msg.header.from{} |WHERE FINAL!="continue"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468287#M131840</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2019-09-04T20:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468288#M131841</link>
      <description>&lt;P&gt;nope does not look at the time, does not retain the time comparison of the final_action events... have to rewrite...&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 20:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468288#M131841</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2019-09-04T20:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468289#M131842</link>
      <description>&lt;P&gt;Final note, the issue is that proofpoint logs have multiple filters with multiple final actions and the logs don't have a absolutely final action or "delivered" or "not delivered" status in the message log.  So I have to correlate a qid field from the message logs to the mta logs and check there if the email was sent...   thank you everyone for you help.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 13:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468289#M131842</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2019-09-13T13:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for the latest field value that is not equal to a certain value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468290#M131843</link>
      <description>&lt;P&gt;Thank you for the answer.  This is a good example for blacklisting.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 13:16:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-the-latest-field-value-that-is-not-equal-to-a/m-p/468290#M131843</guid>
      <dc:creator>Glasses</dc:creator>
      <dc:date>2019-09-13T13:16:07Z</dc:date>
    </item>
  </channel>
</rss>

