<?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: If an event with &amp;quot;removed&amp;quot; appears, how to exclude all other events with the same ID from search results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195708#M56426</link>
    <description>&lt;P&gt;Perhaps something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=applicationX sourcetype=application | transaction ID maxspan=350000s | where NOT like(REASON,"% removed %") | chart stuff ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I removed REASON from the transaction command so all events with the same ID will be in the same transaction.  Then the &lt;CODE&gt;where&lt;/CODE&gt; command should eliminate transactions with "remove" in the REASON field.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jan 2015 14:38:48 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2015-01-19T14:38:48Z</dc:date>
    <item>
      <title>If an event with "removed" appears, how to exclude all other events with the same ID from search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195707#M56425</link>
      <description>&lt;P&gt;The events look like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATE=2015-01-19;TIME=10:34:20;STATUS=INFO;ID=57689;JOB=;ACTION=updateCounter;REASON=NotDigital

DATE=2015-01-19;TIME=10:34:20;STATUS=INFO;ID=30689;JOB=;ACTION=updateCounter;REASON=NotDigital

DATE=2015-01-19;TIME=10:34:20;STATUS=INFO;ID=57689;JOB=;ACTION=updateCounter;REASON=Digital

DATE=2015-01-19;TIME=10:34:20;STATUS=INFO;ID=30689;JOB=;ACTION=updateCounter;REASON=Digital
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I do group them in a transaction (transaction ID, REASON).&lt;BR /&gt;
It does happen that the ORDER gets deleted by the application owner. Then I do have the following event: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DATE=2015-01-09;TIME=14:04:30;STATUS=INFO; JOB=HousekeepingTask;ACTION=deleteFromFileSystem;REASON=Order 30689 removed from file system by user example
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;search looks like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search Index=applicationX sourcetype=application | transaction ID, REASON maxspan=350000s | chart stuff ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I know I could remove them from the results with &lt;CODE&gt;NOT ID=XXXYYY&lt;/CODE&gt;, but I need to remove them as soon the orders are removed by the Application.&lt;/P&gt;

&lt;P&gt;Thank you very much for any suggestion.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 13:12:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195707#M56425</guid>
      <dc:creator>spsdoit</dc:creator>
      <dc:date>2015-01-19T13:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: If an event with "removed" appears, how to exclude all other events with the same ID from search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195708#M56426</link>
      <description>&lt;P&gt;Perhaps something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=applicationX sourcetype=application | transaction ID maxspan=350000s | where NOT like(REASON,"% removed %") | chart stuff ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I removed REASON from the transaction command so all events with the same ID will be in the same transaction.  Then the &lt;CODE&gt;where&lt;/CODE&gt; command should eliminate transactions with "remove" in the REASON field.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 14:38:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195708#M56426</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-19T14:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: If an event with "removed" appears, how to exclude all other events with the same ID from search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195709#M56427</link>
      <description>&lt;P&gt;Thank you. This won't work because you example removes only the event (or transaction) with removed in it.&lt;BR /&gt;
As you can see, the REASON field has different value.  I tried that.&lt;BR /&gt;
The search needs to somehow get the ID from in the remove-event in a variable and then NOT ID like... &lt;BR /&gt;
Sorry if my explanation is misleading.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 14:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195709#M56427</guid>
      <dc:creator>spsdoit</dc:creator>
      <dc:date>2015-01-19T14:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: If an event with "removed" appears, how to exclude all other events with the same ID from search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195710#M56428</link>
      <description>&lt;P&gt;According to the manual, the where command should remove the entire transaction.&lt;BR /&gt;
The key is making sure all events with the same ID are the same transaction.  That is why I use only the ID field in the transaction command.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jan 2015 16:30:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195710#M56428</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-01-19T16:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: If an event with "removed" appears, how to exclude all other events with the same ID from search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195711#M56429</link>
      <description>&lt;P&gt;Well yes, indeed this will work, need to add a transaction with REASON at the end.:&lt;/P&gt;

&lt;P&gt;search index=applicationX sourcetype=application | transaction ID maxspan=350000s | where NOT like(REASON,"% removed %") | transaction REASON | chart stuff ...&lt;/P&gt;

&lt;P&gt;It can happen that I do have have smth like 250000 event's, this will may slow the report down. I will give it a tray to accelerate the search.&lt;BR /&gt;
Otherwise, I will summarize, then create the report on the summary index. &lt;BR /&gt;
Thank you richgalloway.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 12:44:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-an-event-with-quot-removed-quot-appears-how-to-exclude-all/m-p/195711#M56429</guid>
      <dc:creator>spsdoit</dc:creator>
      <dc:date>2015-01-22T12:44:12Z</dc:date>
    </item>
  </channel>
</rss>

