<?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 How to Report System Uptime/Downtime? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195311#M4232</link>
    <description>&lt;P&gt;I'm trying to create a system uptime/downtime report using under the following conditions:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Server starts up, logs a message: "server X starting up"&lt;/LI&gt;
&lt;LI&gt;Some critical transactions start to fail but the server remains up. For the purposes of reporting the server is considered down. Log entries start appearing, such as: "transaction Y failed"&lt;/LI&gt;
&lt;LI&gt;At some point system functionality has to be restored by either restarting the server or by terminating the process. As such, we can't rely on a graceful shutdown message appearing in the logs.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;So, the downtime can be measured as the difference between the first and last occurrence of "transaction Y failed" between "server X starting up" messages. &lt;/P&gt;

&lt;P&gt;I'm looking for suggestions as to how I'd go about creating this report...I can determine all of the information via manual searches but I'd rather automate the process.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Aug 2014 14:07:09 GMT</pubDate>
    <dc:creator>sjnorman</dc:creator>
    <dc:date>2014-08-26T14:07:09Z</dc:date>
    <item>
      <title>How to Report System Uptime/Downtime?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195311#M4232</link>
      <description>&lt;P&gt;I'm trying to create a system uptime/downtime report using under the following conditions:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Server starts up, logs a message: "server X starting up"&lt;/LI&gt;
&lt;LI&gt;Some critical transactions start to fail but the server remains up. For the purposes of reporting the server is considered down. Log entries start appearing, such as: "transaction Y failed"&lt;/LI&gt;
&lt;LI&gt;At some point system functionality has to be restored by either restarting the server or by terminating the process. As such, we can't rely on a graceful shutdown message appearing in the logs.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;So, the downtime can be measured as the difference between the first and last occurrence of "transaction Y failed" between "server X starting up" messages. &lt;/P&gt;

&lt;P&gt;I'm looking for suggestions as to how I'd go about creating this report...I can determine all of the information via manual searches but I'd rather automate the process.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2014 14:07:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195311#M4232</guid>
      <dc:creator>sjnorman</dc:creator>
      <dc:date>2014-08-26T14:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Report System Uptime/Downtime?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195312#M4233</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourindex sourcetype=yoursourcetype "server X starting up" OR "transaction * failed" 
|rex &amp;lt;&amp;lt;field extraction for message, if not already extracted&amp;gt;&amp;gt; | sort 0 _time | eval type=if(like(message,"server % starting up"),"Up","Down")| streamstats current=f window=1 first(type) as prevType | eval include=if(type=prevType,"N","Y") | where include="Y" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should give you just the logs with "server X starting up" and first log with "transaction Y failed". After that you can use transaction command to calculate duration which will be your downtime.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Aug 2014 15:39:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195312#M4233</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-26T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Report System Uptime/Downtime?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195313#M4234</link>
      <description>&lt;P&gt;I'm getting an error with the like clause...it appears to only want 2 parameters:&lt;/P&gt;

&lt;P&gt;like(message,"server % starting up","Up","Down")&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 18:04:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195313#M4234</guid>
      <dc:creator>sjnorman</dc:creator>
      <dc:date>2014-08-27T18:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to Report System Uptime/Downtime?</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195314#M4235</link>
      <description>&lt;P&gt;There was a syntax error in like command. Updated the same.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2014 21:00:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-Report-System-Uptime-Downtime/m-p/195314#M4235</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-27T21:00:45Z</dc:date>
    </item>
  </channel>
</rss>

