<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair)]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">Recently I was told that we need to implement the measures MTBF (Mean Time<br />
Between Failures) and MTTR (Mean Time To Repair) for each node, but I do not know how.</p>
<p dir="auto">Could you help me if there is any somehow to get this measures? Does anybody have implemented<br />
this in NetXMS?</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://forum.netxms.org/topic/2008/mtbf-mean-time-between-failures-and-mttr-mean-time-to-repair</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:42:21 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2008.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 08 Nov 2012 09:23:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Sun, 18 Aug 2013 12:40:50 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor!</p>
<p dir="auto">yes, that was the problem. Thank you very much for your help!</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/11075</link><guid isPermaLink="true">https://forum.netxms.org/post/11075</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Sun, 18 Aug 2013 12:40:50 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Sun, 18 Aug 2013 10:40:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">I've found syntax error in transformation script - if statement starts with capital letter:</p>
<p dir="auto">If (CurrentStatus == 0 || CurrentStatus == 4)</p>
<p dir="auto">after changing it to lowercase, script seems to be working.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/11072</link><guid isPermaLink="true">https://forum.netxms.org/post/11072</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 18 Aug 2013 10:40:44 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Mon, 12 Aug 2013 13:49:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/testos" aria-label="Profile: testos">@<bdi>testos</bdi></a> said in <a href="/post/9738">MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair)</a>:</p>
<blockquote>
<p dir="auto">millerpaint,<br />
I apply this template to nodes that I need to know if my Internet Service Provider meets the Service Level Agreements availability contracted, ie all remote nodes.</p>
<p dir="auto">Best regads.</p>
</blockquote>
<p dir="auto">Hi,</p>
<p dir="auto">is the template intended to be used on any nodes? I tried to apply it to two nodes where I have the netxms agent running, I left it running for a couple of days but I only get:</p>
<p dir="auto">Failure 0<br />
MTBF (hours) empty<br />
MTTR (hours) empty<br />
Node availability (percentage) 0</p>
<p dir="auto">Any hints on where I'm wrong?</p>
<p dir="auto">Best regards,<br />
Marco</p>
]]></description><link>https://forum.netxms.org/post/11001</link><guid isPermaLink="true">https://forum.netxms.org/post/11001</guid><dc:creator><![CDATA[Jmp_3f8h]]></dc:creator><pubDate>Mon, 12 Aug 2013 13:49:11 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Thu, 21 Feb 2013 15:28:06 GMT]]></title><description><![CDATA[<p dir="auto">millerpaint,<br />
I apply this template to nodes that I need to know if my Internet Service Provider meets the Service Level Agreements availability contracted, ie all remote nodes.</p>
<p dir="auto">Best regads.</p>
]]></description><link>https://forum.netxms.org/post/9738</link><guid isPermaLink="true">https://forum.netxms.org/post/9738</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Thu, 21 Feb 2013 15:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Wed, 20 Feb 2013 17:11:45 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">That's really cool! I'll put this into wiki as well.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/9731</link><guid isPermaLink="true">https://forum.netxms.org/post/9731</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 20 Feb 2013 17:11:45 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Wed, 20 Feb 2013 16:29:45 GMT]]></title><description><![CDATA[<p dir="auto">Hi Testos,</p>
<p dir="auto">This is something that we can use for sure.  Were you successful using the simplified 2 step implementation?</p>
<p dir="auto">-Kevin C.</p>
]]></description><link>https://forum.netxms.org/post/9729</link><guid isPermaLink="true">https://forum.netxms.org/post/9729</guid><dc:creator><![CDATA[millerpaint]]></dc:creator><pubDate>Wed, 20 Feb 2013 16:29:45 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Tue, 19 Feb 2013 16:35:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor.</p>
<p dir="auto">Thank you very much for your help.<br />
Based on your proposal, I think that this requirement can be simplified to just two steps:</p>
<ol>
<li>
<ul>
<li>Create a template called say "Availability" with the four DCIs shown in the image<br />
       "Availability template DCIs.png". Transformation scripts for each DCI are these<br />
     <br />
       For "Failures" DCI<br />
     </li>
</ul>
</li>
</ol>
<blockquote>
<p dir="auto">return GetCustomAttribute($node, "NumFailures");</p>
</blockquote>
<p dir="auto">       For "MTBF (hours)" DCI<br />
     </p>
<blockquote>
<p dir="auto">return GetCustomAttribute($node, "mtbf");</p>
</blockquote>
<p dir="auto">       For "MTTR (hours)" DCI<br />
     </p>
<blockquote>
<p dir="auto">return GetCustomAttribute($node, "mttr");</p>
</blockquote>
<p dir="auto">       For "Node availability (percentage)" DCI<br />
     </p>
<blockquote>
<p dir="auto">// This script calculates MTTR, MTBF and perAvailability parameters and stores them in custom attributes<br />
// Initialize some custom attributes the first time.<br />
// Undefined attributes are created by SetCustomAttribute function automatically<br />
CurrentStatus = GetDCIValue($node, FindDCIByName($node, "Status"));<br />
PreviousState = GetCustomAttribute($node, "PreviousState");<br />
if (PreviousState == null)<br />
{ // In the first time, previous state is null<br />
    SetCustomAttribute($node, "PreviousState", CurrentStatus);<br />
    SetCustomAttribute($node, "TimeStamp", time());<br />
    SetCustomAttribute($node, "NumFailures", 0); <br />
    SetCustomAttribute($node, "TotalUptime", 0);<br />
    SetCustomAttribute($node, "TotalDowntime", 0);<br />
    return 100;<br />
}</p>
<p dir="auto">// From here the 2nd and subsequent times<br />
NumFailures = GetCustomAttribute($node, "NumFailures");<br />
LastTime = time() - GetCustomAttribute($node, "TimeStamp");</p>
<p dir="auto">// Status is up<br />
if (CurrentStatus == 0)<br />
{<br />
    if (PreviousState != CurrentStatus)<br />
    {	// just changed to up<br />
        // update mttr<br />
        TotalDowntime = GetCustomAttribute($node, "TotalDowntime") + LastTime;<br />
        mttr = TotalDowntime / ((NumFailures == 0) ? 1 : NumFailures) / 3600;	// to prevent division by ze<br />
        SetCustomAttribute($node, "TotalDowntime", TotalDowntime);<br />
        SetCustomAttribute($node, "mttr", mttr);<br />
    }<br />
    else<br />
    {		// still up<br />
        // update mtbf<br />
        TotalUptime = GetCustomAttribute($node, "TotalUptime") + LastTime;<br />
        mtbf = TotalUptime / ((NumFailures == 0) ? 1 : NumFailures) / 3600;	// to prevent division by zero<br />
        SetCustomAttribute($node, "TotalUptime", TotalUptime);<br />
        SetCustomAttribute($node, "mtbf", mtbf);<br />
    }<br />
}</p>
<p dir="auto">// Status is down<br />
if (CurrentStatus == 4)<br />
{<br />
    if (PreviousState != CurrentStatus)<br />
    {	// just changed to down<br />
        // update mtbf<br />
        NumFailures++;<br />
        TotalUptime = GetCustomAttribute($node, "TotalUptime") + LastTime;<br />
        mtbf = TotalUptime / NumFailures / 3600;<br />
        SetCustomAttribute($node, "NumFailures", NumFailures);<br />
        SetCustomAttribute($node, "TotalUptime", TotalUptime);<br />
        SetCustomAttribute($node, "mtbf", mtbf);<br />
    }<br />
    else<br />
    {	// still down<br />
        // update mttr<br />
        TotalDowntime = GetCustomAttribute($node, "TotalDowntime") + LastTime;<br />
        mttr = TotalDowntime / NumFailures / 3600;<br />
        SetCustomAttribute($node, "TotalDowntime", TotalDowntime);<br />
        SetCustomAttribute($node, "mttr", mttr);<br />
        <br />
    }<br />
}</p>
<p dir="auto">If (CurrentStatus == 0 || CurrentStatus == 4)<br />
{<br />
    // Save previous state and timestamp<br />
    SetCustomAttribute($node, "PreviousState", CurrentStatus);<br />
    SetCustomAttribute($node, "TimeStamp", time());</p>
<p dir="auto">    // perAvailability section<br />
    TotalUptime = GetCustomAttribute($node, "TotalUptime");<br />
    TotalDowntime = GetCustomAttribute($node, "TotalDowntime");<br />
    perAvailability = TotalUptime / (TotalUptime + TotalDowntime) * 100;<br />
    SetCustomAttribute($node, "perAvailability", perAvailability);</p>
<p dir="auto">    return perAvailability;<br />
}</p>
</blockquote>
<ol start="2">
<li>
<ul>
<li>Apply manually previous template to nodes required or apply this template automatically to nodes filtered by custom script (Properties -&gt; Automatic Apply Rules).</li>
</ul>
</li>
</ol>
<p dir="auto">In this way, we avoid having to define custom attributes (now created by the fourth transformation script), events, actions, event processing policy rules, etc.<br />
In addition, the four DCIs are updated at each polling interval.<br />
Only supports up (Normal = 0) and down (Critical = 4) node status.</p>
<p dir="auto">Best regards.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001075-Availability_template_DCIs.png" alt="Availability template DCIs.png" class="img-markdown  img-fluid" width="751" height="151" /></p>
]]></description><link>https://forum.netxms.org/post/9723</link><guid isPermaLink="true">https://forum.netxms.org/post/9723</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Tue, 19 Feb 2013 16:35:04 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Tue, 20 Nov 2012 09:20:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">One possible way to implement MTBF calculation could be following:</p>
<ol>
<li>Assume that you have two events, one for downtime start and one for downtime end.</li>
<li>We will use the following custom attributes for each node:</li>
</ol>
<p dir="auto">mtbf<br />
mtbfTotalUptime<br />
mtbfNumFailures<br />
mtbfTimeUp</p>
<ol start="3">
<li>On downtime end, run the following script:</li>
</ol>
<pre><code>SetCustomAttribute($node, "mtbfTimeUp", time());
</code></pre>
<ol start="4">
<li>On downtime start, run the following script:</li>
</ol>
<pre><code>uptime = time() - GetCustomAttribute($node, "mtbfTimeUp");
mtbfNumFailures = GetCustomAttribute($node, "mtbfNumFailures");
if (mtbfNumFailures == null)
   mtbfNumFailures = 0;
mtbfNumFailures++;
mtbfTotalUptime = GetCustomAttribute($node, "mtbfTotalUptime");
if (mtbfTotalUptime == null)
   mtbfTotalUptime = 0;
mtbfTotalUptime += uptime;
mtbf = mtbfTotalUptime / mtbfNumFailures;
SetCustomAttribute($node, "mtbfNumFailures", mtbfNumFailures);
SetCustomAttribute($node, "mtbfTotalUptime", mtbfTotalUptime);
SetCustomAttribute($node, "mtbf", mtbf);
</code></pre>
<p dir="auto">After this script execution, custom attribute "mtbf" will contain MTBF in seconds.</p>
<ol start="5">
<li>If you want to see current MTBF value as DCI for the node, you can create DCI with source "Internal" and name "Dummy", and use the following transformation script:</li>
</ol>
<pre><code>return GetCustomAttribute($node, "mtbf");
</code></pre>
<p dir="auto">MTTR can be calculated in similar way.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/8956</link><guid isPermaLink="true">https://forum.netxms.org/post/8956</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 20 Nov 2012 09:20:51 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Mon, 19 Nov 2012 13:01:51 GMT]]></title><description><![CDATA[<p dir="auto">Hi.</p>
<p dir="auto">These are nodes that have only SNMP capabilities. The node failed state is determined by the node Internal State oid.</p>
<blockquote>
<p dir="auto">After that you can do some combination of internal DCIs and custom attributes to do calculations.</p>
</blockquote>
<p dir="auto">Can you expand this?</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://forum.netxms.org/post/8953</link><guid isPermaLink="true">https://forum.netxms.org/post/8953</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Mon, 19 Nov 2012 13:01:51 GMT</pubDate></item><item><title><![CDATA[Reply to MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair) on Thu, 08 Nov 2012 12:22:45 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Key question here is how you determine if node is in a failed state. After that you can do some combination of internal DCIs and custom attributes to do calculations.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/8890</link><guid isPermaLink="true">https://forum.netxms.org/post/8890</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 08 Nov 2012 12:22:45 GMT</pubDate></item></channel></rss>