<?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: Application Logging: Select events that don't have certain values, not exclude- but never had those events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595854#M207408</link>
    <description>&lt;P&gt;I think if I use NOT [subsearch] this will work.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 21:08:10 GMT</pubDate>
    <dc:creator>charbaugh77</dc:creator>
    <dc:date>2022-04-28T21:08:10Z</dc:date>
    <item>
      <title>Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595851#M207407</link>
      <description>&lt;P&gt;I have a .net core application that logs various events with properties (WorkItem, EventName, etc).&lt;BR /&gt;&lt;BR /&gt;I need to query WorkItems that have never had certain events kinda like a SQL NOT Exists.&amp;nbsp; I can filter out the events I don't want but I cannot select where they never existed.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;WorkItem | Event&lt;BR /&gt;&lt;/U&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Task Created&lt;BR /&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Retrieval Ready&lt;BR /&gt;1234&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | NIGO Completed&lt;BR /&gt;5678&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Retrieval Ready&lt;BR /&gt;9012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Task Created&lt;BR /&gt;9012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Retrieval Ready&lt;BR /&gt;&lt;BR /&gt;The query should return all WorkItems with events that equal Retrieval Ready and not NIGO Completed...example result.&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;WorkItem | Event&lt;BR /&gt;&lt;/U&gt;5678&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Retrieval Ready&lt;BR /&gt;9012&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Retrieval Ready&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 20:56:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595851#M207407</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-04-28T20:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595854#M207408</link>
      <description>&lt;P&gt;I think if I use NOT [subsearch] this will work.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 21:08:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595854#M207408</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-04-28T21:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595890#M207425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245349"&gt;@charbaugh77&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you have two choices:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;use a subsearch, following the hint from&amp;nbsp;@charbaug77&lt;/LI&gt;&lt;LI&gt;&amp;nbsp;goup events anf filter them.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;the first solution is easier but in general has the limitation of 50,000 results and probably it isn't your case.&lt;/P&gt;&lt;P&gt;Anyway, first solution:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index NOT [ search index=your_index "Task Created"="NIGO Completed" | fields WorkItem ]
| table WorkItem Event&lt;/LI-CODE&gt;&lt;P&gt;second option:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index 
| stats values(Event) AS Event count(eval(if("Task Created"="NIGO Completed",1,0))) AS check BY WorkItem
| where check=0
| mvexpand Event
| table WorkItem Event&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Apr 2022 06:50:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/595890#M207425</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-29T06:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596186#M207538</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to understand the second option.&amp;nbsp; This doesn't make sense to me.&amp;nbsp; How is Task Created=NIGO Completed?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;count(eval(if("Task Created"="NIGO Completed",1,0)))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;This does seem to work better but I would like to understand more for future reference.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Corey&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 18:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596186#M207538</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-05-02T18:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596213#M207548</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245349"&gt;@charbaugh77&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the second option is very useful when you have to check a condition and you cannot use subsearches because the subsearch could have more than 50,000 results (this is the limit of subsearches).&lt;/P&gt;&lt;P&gt;It works grouping for the common key and identifying a condition in bot the main and secondary search (in your case the eval command).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the Contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 06:35:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596213#M207548</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-03T06:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596264#M207568</link>
      <description>&lt;P&gt;Hello again&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm wonder how eval part works.&amp;nbsp; To me this would always be 0.&amp;nbsp; When would this condition every equal 1 and how does it work?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if("Task Created"="NIGO Completed",1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596264#M207568</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-05-03T14:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596266#M207570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245349"&gt;@charbaugh77&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in few words, the count in stats command runs only when the condition is matched.&lt;/P&gt;&lt;P&gt;I needed much time to understand how to use eval in stats!&lt;/P&gt;&lt;P&gt;In addition, a little hint: avoid field names (as e.g. "Task Created") using spaces or dots or "-", because you have always to use quotes and somethimes in the eval command it doesn't work.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596266#M207570</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-03T14:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596270#M207571</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;-&amp;nbsp;Task Created is not a field name.&amp;nbsp; Its a field value for the Events field.&amp;nbsp; Did you get confused?&amp;nbsp; See the original post, please.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596270#M207571</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-05-03T14:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596271#M207572</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/245349"&gt;@charbaugh77&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry! use "Event" as field name in all the eval statements!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 15:02:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596271#M207572</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-05-03T15:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: Application Logging: Select events that don't have certain values, not exclude- but never had those events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596272#M207573</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;Thank you...this was very confusing to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 15:06:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Application-Logging-Select-events-that-don-t-have-certain-values/m-p/596272#M207573</guid>
      <dc:creator>charbaugh77</dc:creator>
      <dc:date>2022-05-03T15:06:00Z</dc:date>
    </item>
  </channel>
</rss>

