<?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 using transaction to check service status in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272602#M82068</link>
    <description>&lt;P&gt;Hi  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;we have McAfee Solidifier (software for real-time change  monitoring to software code and servers configuration ) .&lt;/P&gt;

&lt;P&gt;Solidifier  is installed on users PC's ,but unfortunately users with administrative privileges can stop  Solidifier  services and hence stop monitoring !!&lt;/P&gt;

&lt;P&gt;Using Splunk , we are monitoring  McAfee Solidifier service status if it's running or stopped but &lt;BR /&gt;
 when  user's PC is going to halt ( shutdown) , windows system will generate a message that  &lt;STRONG&gt;McAfee Solidifier service has stopped&lt;/STRONG&gt; then &lt;STRONG&gt;another message that system will shutdown .&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;like this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Message=The McAfee Solidifier service entered the stopped state.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Message=The operating system is shutting down at system time ‎2016‎-‎03‎-‎30T13:15:00.728125000Z.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i need to get alert  &lt;STRONG&gt;only when&lt;/STRONG&gt;  Solidifier  service is stopped but no shutdown event is generated after it (as in  normal shutdown process ) &lt;/P&gt;

&lt;P&gt;i used this query but it's not working as expected : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*" EventType=4 | transaction ComputerName startswith="The McAfee Solidifier service entered the stopped state" endswith=search(body!="The operating system is shutting"* ) maxpause=60s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;kindly find log events sample below :&lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;04:14:56 PM
LogName=System
SourceName=Microsoft-Windows-Service Control Manager
EventCode=7036
EventType=4
Type=Information
ComputerName=QC2
TaskCategory=The operation completed successfully.
OpCode=The operation completed successfully.
RecordNumber=408853
Keywords=Classic
Message=The McAfee Solidifier service entered the stopped state.


04:15:00 PM
LogName=System
SourceName=Microsoft-Windows-Kernel-General
EventCode=13
EventType=4
Type=Information
ComputerName=QC2
TaskCategory=None
OpCode=Info
RecordNumber=408854
Keywords=None
Message=The operating system is shutting down at system time ‎2016‎-‎03‎-‎30T13:15:00.728125000Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks .&lt;/P&gt;</description>
    <pubDate>Sun, 03 Apr 2016 09:40:59 GMT</pubDate>
    <dc:creator>abdallah_hegazy</dc:creator>
    <dc:date>2016-04-03T09:40:59Z</dc:date>
    <item>
      <title>using transaction to check service status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272602#M82068</link>
      <description>&lt;P&gt;Hi  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;we have McAfee Solidifier (software for real-time change  monitoring to software code and servers configuration ) .&lt;/P&gt;

&lt;P&gt;Solidifier  is installed on users PC's ,but unfortunately users with administrative privileges can stop  Solidifier  services and hence stop monitoring !!&lt;/P&gt;

&lt;P&gt;Using Splunk , we are monitoring  McAfee Solidifier service status if it's running or stopped but &lt;BR /&gt;
 when  user's PC is going to halt ( shutdown) , windows system will generate a message that  &lt;STRONG&gt;McAfee Solidifier service has stopped&lt;/STRONG&gt; then &lt;STRONG&gt;another message that system will shutdown .&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;like this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Message=The McAfee Solidifier service entered the stopped state.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Message=The operating system is shutting down at system time ‎2016‎-‎03‎-‎30T13:15:00.728125000Z.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i need to get alert  &lt;STRONG&gt;only when&lt;/STRONG&gt;  Solidifier  service is stopped but no shutdown event is generated after it (as in  normal shutdown process ) &lt;/P&gt;

&lt;P&gt;i used this query but it's not working as expected : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*" EventType=4 | transaction ComputerName startswith="The McAfee Solidifier service entered the stopped state" endswith=search(body!="The operating system is shutting"* ) maxpause=60s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;kindly find log events sample below :&lt;/EM&gt;&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;04:14:56 PM
LogName=System
SourceName=Microsoft-Windows-Service Control Manager
EventCode=7036
EventType=4
Type=Information
ComputerName=QC2
TaskCategory=The operation completed successfully.
OpCode=The operation completed successfully.
RecordNumber=408853
Keywords=Classic
Message=The McAfee Solidifier service entered the stopped state.


04:15:00 PM
LogName=System
SourceName=Microsoft-Windows-Kernel-General
EventCode=13
EventType=4
Type=Information
ComputerName=QC2
TaskCategory=None
OpCode=Info
RecordNumber=408854
Keywords=None
Message=The operating system is shutting down at system time ‎2016‎-‎03‎-‎30T13:15:00.728125000Z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks .&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2016 09:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272602#M82068</guid>
      <dc:creator>abdallah_hegazy</dc:creator>
      <dc:date>2016-04-03T09:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: using transaction to check service status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272603#M82069</link>
      <description>&lt;P&gt;First, avoid &lt;CODE&gt;transaction&lt;/CODE&gt;; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="*" EventType=4 ("The McAfee Solidifier service entered the stopped state" OR "The operating system is shutting")
| reverse | streamstats count(searchmatch("The McAfee Solidifier service entered the stopped state")) AS SessionID BY ComputerName
| reverse | streamstats current=f last(_time) AS next_time BY SessionID ComputerName
| eval delta = next_time - _time
| where isnull(next_time) OR delta&amp;lt;=60
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will show every "stop event" which either does not have a "shutdown" event (or has one, but it is father than 60 seconds later).  I think probably you do not need the &lt;CODE&gt;delta&lt;/CODE&gt; stuff at all (you probably only had that to keep &lt;CODE&gt;transaction&lt;/CODE&gt; from blowing up).&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2016 14:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272603#M82069</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-04-03T14:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: using transaction to check service status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272604#M82070</link>
      <description>&lt;P&gt;@  woodcock  Thanks a lot for your kind support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
i will check and follow up soon . Thanks &lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2016 19:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transaction-to-check-service-status/m-p/272604#M82070</guid>
      <dc:creator>abdallah_hegazy</dc:creator>
      <dc:date>2016-04-03T19:51:40Z</dc:date>
    </item>
  </channel>
</rss>

