<?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 would I exclude events that normally occur after a restart of a server? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282177#M85171</link>
    <description>&lt;P&gt;Let's try a different approach&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os ("SYSTEM_SHUTDOWN" OR "CONFIG_CHANGE") | rex "(?&amp;lt;action&amp;gt;SYSTEM_SHUTDOWN|CONFIG_CHANGE)" |  autogress action as next_action | where action=next_action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 27 Jul 2016 19:14:47 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-07-27T19:14:47Z</dc:date>
    <item>
      <title>How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282170#M85164</link>
      <description>&lt;P&gt;On our Linux servers, we see that audit policies are re-applied to the audit service whenever the service is restarted. I'm trying to find a way to only generate events if a restart of the server has not occurred within a given period of time (likely 10-15) minutes. How would I configure my search to search for audit change events that are not within 15 minutes of a server restart?&lt;/P&gt;

&lt;P&gt;Search for finding a change in audit settings:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os* key="MAC-policy" type=CONFIG_CHANGE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search for finding server restarts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os* type=SYSTEM_SHUTDOWN
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 14:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282170#M85164</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2016-07-27T14:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282171#M85165</link>
      <description>&lt;P&gt;See if this works. What this should do, is group all events that start with Shutdown and have a CONFIG_CHANGE within 15min timespan. All other events will not be grouped. closed_txn=f, returns ungrouped events. You may have to experiment with &lt;CODE&gt;keepevicted&lt;/CODE&gt; vs &lt;CODE&gt;keeporphans&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os | transaction maxspan=16m startswith="SYSTEM_SHUTDOWN" endswith="CONFIG_CHANGE" keepevicted=t | where closed_txn=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Transaction" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282171#M85165</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T10:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282172#M85166</link>
      <description>&lt;P&gt;Wouldn't marking all transactions as open mean that the "CONFIG_CHANGE" wasn't taking place? 100% of the time it will take place after a reboot so I need to be able to see this event if the "SYSTEM_SHUTDOWN" doesn't occur.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282172#M85166</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2020-09-29T10:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282173#M85167</link>
      <description>&lt;P&gt;This doesn't mark all transaction as open. It will mark transactions as open if it DOES NOT meet any of these criteris&lt;/P&gt;

&lt;P&gt;1) Find SYSTEM_SHUTDOWN&lt;BR /&gt;
2) Find CONFIG_CHANGE within 15mins of SYSTEM_SHUTDOWN&lt;/P&gt;

&lt;P&gt;Once it groups the transactions, (SYSTEM_SHUTDOWN &amp;amp; CONFIG_CHANGE within 15min span) remaining events will be marked as "open" transactions. The where clause will keep only the open transactions.&lt;/P&gt;

&lt;P&gt;To make this cleaner, you could add ("SYSTEM_SHUTDOWN" OR "CONFIG_CHANGE") to your base search to minimize the events returned. &lt;/P&gt;

&lt;P&gt;Were you able to try the query? What results did you get?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282173#M85167</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T10:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282174#M85168</link>
      <description>&lt;P&gt;The results showed transactions but the ones I saw didn't start with "SYSTEM_SHUTDOWN" so I flipped the keepevicted value to false and the events that were generated are not showing now but I need to do an effective test by rebooting my test machine then adding an audit rule.&lt;/P&gt;

&lt;P&gt;Update: Looks like that did not produce an event when I added an audit rule. Here is what happened:&lt;/P&gt;

&lt;P&gt;First I kept the "keepevicted=t". This produced events but the events produced are within the span of time. If the idea was to produce events outside the span of time, this did not work.&lt;/P&gt;

&lt;P&gt;Next I changed it to "keepevicted=f". This produced no events so I changed to span down to 1s to force a result and still no result so this did not work.&lt;/P&gt;

&lt;P&gt;Next I changed it from "keepevicted=f" to "keeporphans=t". This produced no results so it did not work.&lt;/P&gt;

&lt;P&gt;Next I changed it to "keeporphans=f". This produced no results so it did not work.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 17:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282174#M85168</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2016-07-27T17:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282175#M85169</link>
      <description>&lt;P&gt;My understanding is you DO NOT want CONFIG_CHANGE" right after a "SYSTEM_SHUTDOWN". If that's true, you should set &lt;CODE&gt;keepevicted=t&lt;/CODE&gt;. You want all events that are NOT grouped in a transaction. To verify the findings, do a &lt;CODE&gt;table _time _raw closed_txn&lt;/CODE&gt; and compare the events where &lt;CODE&gt;closed_txn=0&lt;/CODE&gt; and &lt;CODE&gt;closed_txn=1&lt;/CODE&gt;. The one's with 1 should have "SYSTEM_SHUTDOWN" AND/OR "CONFIG_CHANGE" where as the the other should only have "CONFIG_CHANGE" &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:23:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282175#M85169</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2020-09-29T10:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282176#M85170</link>
      <description>&lt;P&gt;I want to see the "CONFIG_CHANGE" event ONLY if the "SYSTEM_SHUTDOWN" event hasn't occurred in the last 15m. That would be the only time the "CONFIG_CHANGE" event would be relevant to our security team.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282176#M85170</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2020-09-29T10:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282177#M85171</link>
      <description>&lt;P&gt;Let's try a different approach&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=os ("SYSTEM_SHUTDOWN" OR "CONFIG_CHANGE") | rex "(?&amp;lt;action&amp;gt;SYSTEM_SHUTDOWN|CONFIG_CHANGE)" |  autogress action as next_action | where action=next_action
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jul 2016 19:14:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282177#M85171</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-27T19:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282178#M85172</link>
      <description>&lt;P&gt;That does the trick. &lt;/P&gt;

&lt;P&gt;So I understand it, are you skipping the first CONFIG_CHANGE event that occurs after a SYSTEM_SHUTDOWN event?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 10:23:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282178#M85172</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2020-09-29T10:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282179#M85173</link>
      <description>&lt;P&gt;That's Correct&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 19:31:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282179#M85173</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-07-27T19:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: How would I exclude events that normally occur after a restart of a server?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282180#M85174</link>
      <description>&lt;P&gt;That works for me. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2016 19:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-would-I-exclude-events-that-normally-occur-after-a-restart/m-p/282180#M85174</guid>
      <dc:creator>jmaple</dc:creator>
      <dc:date>2016-07-27T19:32:47Z</dc:date>
    </item>
  </channel>
</rss>

