%LastBadStatusTime% and %LastBadStatusDuration%?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Robert_in_MTL
Posts: 229
Joined: Tue Jun 20, 2006 1:20 pm
Location: Montreal, Quebec

%LastBadStatusTime% and %LastBadStatusDuration%?

Post by Robert_in_MTL »

Hi Alex,

I have a V-P (and one of his clients) here that would like to see the last timestamp and duration where the test went bad in a report.

Is there anything like %LastBadStatusTime% and %LastBadStatusDuration%?

For now I am using this in custom HTML report and it works well:

Code: Select all

<table border=0 cellspacing=0 cellpadding=0 >
<tr><td nowrap>Test name:</td><td> </td><td nowrap><b>%TestName%</b></td></tr>
<tr><td nowrap>Test type:</td><td> </td><td nowrap>%TestMethod%</td></tr>
<tr><td nowrap>Last Test Time</td><td> </td><td nowrap>%LastTestTime%</td></tr>
<tr><td nowrap>Status was</td><td> </td><td nowrap><b>%LastSimpleStatus%</b></td></tr>
<tr><td nowrap>Status Duration</td><td> </td><td nowrap>%CurrentStatusDuration%</td></tr>
<tr><td nowrap>Since</td><td> </td><td nowrap>%StatusChangedTime%</td></tr>
<tr><td nowrap>Last Reply</td><td> </td><td nowrap>%LastReply%</td></tr>
<tr><td nowrap>Interval</td><td> </td><td nowrap>%Interval% </td></tr>
<tr><td nowrap><u>Global Info (this test):</u></td></tr>
<tr><td nowrap colspan=3>
<table border=0 cellspacing=0 cellpadding=0 >
<tr><td nowrap>Total tests</td><td>   </td><td nowrap align="right">%TotalTests%</td></tr>
<tr><td nowrap>Good count / (ratio)</td><td></td><td nowrap align="right" >%PassedCnt%</td><td>  </td><td nowrap align="right"> ( %AliveRatio% )</td></tr>
<tr><td nowrap>Bad  count / (ratio)</td><td></td><td nowrap align="right">%FailedCnt%</td><td>  </td><td nowrap align="right"> ( %DeadRatio% )</td></tr>
</table></td></tr>
<tr><td nowrap colspan=3><hr></td></tr>
</table>
But I would like to insert the requested fields in there.

If the macros are not available, do you have an idea on how I could provide this?

Thanks for your time.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think you may use the following variables
%PreviousStatus%
%PreviousStatusTime%
%PreviousStatusDuration%
%PreviousStatusDuration_Sec%
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro

Regards
Alex
Robert_in_MTL
Posts: 229
Joined: Tue Jun 20, 2006 1:20 pm
Location: Montreal, Quebec

Post by Robert_in_MTL »

I understand,

The thing is that if the report is created during a Bad status situation, %PreviousStatus% will give me a good (or unknown)...

What he wants, is when did the last Bad occurred and what was the downtime duration.

I will present him %PreviousStatus% for now.

Thanks for the suggestion.
Post Reply