View previous topic :: View next topic |
Author |
Message |
AntonyP
Joined: 02 Jan 2006 Posts: 159 Location: Athens Greece
|
Posted: Thu Feb 15, 2007 4:33 am Post subject: Report for last 24 hours with selected tests |
|
|
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!!! |
|
Back to top |
|
|
KS-Soft Europe
Joined: 16 May 2006 Posts: 2832
|
Posted: Thu Feb 15, 2007 6:10 am Post subject: |
|
|
In fact, you may use Custom HTML Reports: http://www.ks-soft.net/hostmon.eng/mframe.htm#profiles.htm#CustomHTML
You just should specify JavaScript inside the body of report that checks %StatusChangesCnt% variable.
Test Items section should be like this:
Code: | <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/mframe.htm#testlist.htm#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 |
|
Back to top |
|
|
AntonyP
Joined: 02 Jan 2006 Posts: 159 Location: Athens Greece
|
Posted: Thu Feb 15, 2007 6:56 am Post subject: |
|
|
"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? |
|
Back to top |
|
|
KS-Soft
Joined: 03 Apr 2002 Posts: 12801 Location: USA
|
Posted: Thu Feb 15, 2007 10:50 am Post subject: |
|
|
Quote: | 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
Quote: | 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 |
|
Back to top |
|
|
AntonyP
Joined: 02 Jan 2006 Posts: 159 Location: Athens Greece
|
Posted: Fri Feb 16, 2007 1:03 am Post subject: |
|
|
I see. Well, thanks for the response anyway |
|
Back to top |
|
|
|