Report for last 24 hours with selected tests

Exchange HTML report templates between users.
Post Reply
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Report for last 24 hours with selected tests

Post by AntonyP »

Hello,

I am trying to create an automated report, which will contain all tests that in the last 24 hours had their status changed from good to bad (or-unknown) more than 5 times. Is this possible to achieve using HM?

Thanks in advance!!!
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

In fact, you may use Custom HTML Reports: http://www.ks-soft.net/hostmon.eng/mfra ... CustomHTML
You just should specify JavaScript inside the body of report that checks %StatusChangesCnt% variable.

Test Items section should be like this:

Code: Select all

<SCRIPT type="text/javascript">
  var changes_count = %StatusChangesCnt%;
  if (changes_count > 5 )
     document.write('%TestName%, %StatusChangesCnt%, etc.<BR>');
</script>
Actually, the problem is to filter last 24 hours. To achieve this goal, I would suggest you to reset statistics every day. http://www.ks-soft.net/hostmon.eng/mfra ... FolderTree
In such case, you should create foregoing "Custom" report, create action profile with "Generate Reports" action, enable "Reset statistics daily" option in "Folder Properties" > "Statistics" tab, mark "Execute action profile before reset statistics" option and select action profile with "Generate reports" action.

Please note: reseting statistics may affect other reports data!

Another solution is to use ODBC Logging with query, that contains '%StatusChangesCnt%' variable and Log Analyzer.

Regards,
Max
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

"Please note: reseting statistics may affect other reports data! "

How else will reseting the stats daily affect the other reports data?

E.g. if i want to create a report with the monthly stats of a test, i will not have a problem, right?

Reseting the stats daily should only change the percentage number that i will get if i press "statistics" option of a test, is this not so?
KS-Soft
Posts: 12869
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

E.g. if i want to create a report with the monthly stats of a test, i will not have a problem, right?
You will have a problem
Reseting the stats daily should only change the percentage number that i will get if i press "statistics" option of a test, is this not so?
"Statistisc" menu item starts Log Analyzer that analyzes log files. "Reset statistics" will not effect logs. It will effect everything else.
I am afraid we do not have solution for you

Regards
Alex
AntonyP
Posts: 159
Joined: Mon Jan 02, 2006 9:40 am
Location: Athens Greece

Post by AntonyP »

I see. Well, thanks for the response anyway :wink:
Post Reply