Send Status report - but only if "failed tests" ar

Exchange HTML report templates between users.
Post Reply
KarlZ
Posts: 11
Joined: Fri Apr 30, 2021 3:32 am

Send Status report - but only if "failed tests" ar

Post by KarlZ »

I want to send status a status report of the system, but only if failed tests are included in the report.

1. I have create an action profile "Action-Report-Test". I have added a send to mail action to [b]"Bad status area"[/b] only. I have set the condition to "on the schedule"

2. I have setup a report every 5 min on the folder level "root" (and excluded some some folders, that should not be part of the report)

3. I have added the action profile to the report generation "Execute an action profile when complete"

Basically this works great. E-Mail will be generated and sends the report as attachement.

But the mail will be triggered at any time - even if there are no failed tests inside report.

Is there a way to send the report only, if the reports include failed tests.

Thanks for help
Karl.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

May be you don't need to create report if there are no bad tests?
I think you need to remove report generation from scheduler and use additional test.
E.g.
- create alert profile with 2 actions (Generate reports; send e-mail) using advanced mode expression like %HM_BadItems%>0
- create test: Ping localhost every 5 min; assign this alert profile to the test; optionally mark "Exclude from reports" options

This way test will be performed every 5 min; report will be created and sent if there is any bad test item.
Or you may use advanced expression only for Send e-mail action (if you need to create report every 5 min regardless of statuses)

You may use expressions like
(%HM_BadItems%>0) or (%HM_UnknownItems%>0) or (%HM_Warning%>0)
You may use expressions like
(%HM_BadItems%-%HM_AckBadItems%>0) or (%HM_UnknownItems%-%HM_UnknItems%>0) or (%HM_Warning%-%HM_AckWarnItems%>0)

You may do the same on per-folder basis (when you need separate reports for each folder), using additional test in each folder and variables like %FolderRecursive_BadTests% or %FolderCurrent_BadTests%

Regards
Alex
Post Reply