SLA type report

If you have information, script, utility, or idea that can be useful for HostMonitor community, you welcome to share information in this forum.
Post Reply
ChristianD
Posts: 18
Joined: Wed Aug 06, 2003 6:00 pm
Contact:

SLA type report

Post by ChristianD »

Hi,

i created some scripts for my own to do some sla reporting with variables:
I use 98% as a key to make the item red when its below.
This percentage could also be a CommentLine? variable to make it more scriptable.

I hope someone could also make use of it.

Sincere,
Christian

Custom Report:
Test Items:
<script type="text/vbscript">
if (%AliveRatio%>98 ) then
document.write("<input type=button class=Good value=""%TestName% (%AliveRatio%%)"" onclick=""showinfo('\n%TestName% \n%CommentLine2% \n%CommentLine3% \n%CommentLine4% \n%CommentLine5% \n%CommentLine6% \nAverage Reply: %AverageReply%')"">")
Else
document.write("<input type=button class=Bad value=""%TestName% (%AliveRatio%%)"" onclick=""showinfo('\n%TestName% \n%CommentLine2% \n%CommentLine3% \n%CommentLine4% \n%CommentLine5% \n%CommentLine6% \nAverage Reply: %AverageReply%')"">")
end if
</script>

Folder Summary:
<HR>
<script type="text/vbscript">
If (%FolderCurrent_TotalTests%>0) then
If (cint(%FolderAverage_AliveRatio%+1-1) >=98 ) then
Document.write("<font color=""green""><b>Aantal tests: %FolderCurrent_TotalTests% - Uptime: %FolderAverage_AliveRatio%% - Unknown time: %FolderAverage_UnknownRatio%% - Downtime: %FolderAverage_DeadRatio%%</b></font>")
Else
Document.write("<font color=""red""><b>Aantal tests: %FolderCurrent_TotalTests% - Uptime: %FolderAverage_AliveRatio%% - Unknown time: %FolderAverage_UnknownRatio%% - Downtime: %FolderAverage_DeadRatio%%</4></font>")
End if
End if
</script>
ericm
Posts: 40
Joined: Tue Feb 10, 2004 6:29 am

Loading Scripts

Post by ericm »

Dumb ?
how do I load this?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

- use menu "Profiles"->"Report profiles" to open Report Profiles dialog.
- click "New" button to create new report profile
- choose "Custom HTML" as report type
- click on small button beside "report type" combo to setup profile
- copy & paste code into appropriate sections ("Folder Summary" into "Folder Summary" section; "Test items" into "Test items" sections)

Regards
Alex
Post Reply