The trigger expression {hosts1:web.test.fail[test.example.com].last()} will return a result of the latest test:
- 0 - OK. The web scenario test.example.com (all steps) was tested successfully;
- 1 - The first step of the web scenario test.example.com was failed (you have only one step of the scenario as you told);
- UNKNOWN - The web host is unreachable.
If the trigger expression will return UNKNOWN state or value more than 0, the trigger will generate PROBLEM alert.
If you want to generate alert after three consecutive failed checks then rewrite the trigger expression as:
{hosts1:web.test.fail[test.example.com].sum(#3)}>0 This trigger will work with any step counts of your web scenario. It sends PROBLEM alert at first failed test and sends OK restore alert after three consecutive successful checks (180 secs after service was fully restored).