Hi. I have a question about e-mail alerts using advanced mode. I have ping tests set up to monitor connectivity on 5 minutes intervals and alert when the connection goes down, and again when it comes back up. When i have it alert on one failure, it works perfectly by using ('%Status%'=='No answer') and ('%LastStatus%'=='Host is alive'). However, we were getting some "false positives" because they would respond again on the next test.
So i changed the 'down' alert method to alert after 2 recurrences:
('%Status%'=='No answer') and (%Recurrences%==2) - Which works quite well.
However, when a test fails just once the %LastStatus% is obviously still 'No answer' so my current method of the 'up' alert sends e-mails without ever having sent one saying it was down. My current 'up' alert is on the condition of:
('%Status%'=='Host is alive') and ('%LastStatus%'=='No answer'),
Is there a way to have it alert 'bad' only after 2 failures, but alert 'good' after the first successful test?
E-mail alerts
Sure, this is possible. I just do not understand why do you need "advanced" mode?Is there a way to have it alert 'bad' only after 2 failures, but alert 'good' after the first successful test?
You may use standard actions. Simply set
- "Start when 2 consecutive Bad results occur" option for "bad" action
and use
- "Start when 1 consecutive Good result occurs" option for "good" action.
Plus you need to enable "Action depends on bad one" option for "good" action
Quote from the manual
RegardsStart when N consecutive Bad/Good results occur
This parameter determines when to execute an action. For example you want to send a message to a network administrator's pager after three unsuccessful tests of the web server consecutively, set this parameter to 3. If you want to start action right after the test status was changed, set parameter to 1.
Repeat: N times; or until status changes
Defines the number of repeats of the action if the status of the test was not changed. For example if you want to send an e-mail to a network administrator only once when test status changes, set this parameter to 1. If you need to execute action every time when test failed, set this option to "until status changes".
Action depends on "bad" one
This optional parameter is available for "Good" actions only. You can set "Good" action dependable on a "Bad" action. Why do you need it? For example you defined "Bad" action to send an e-mail notification to the network administrator when test fails 3 times consecutively (start when 3 consecutive "Bad" results occur), also you defined «Good» action to send a notification when the test status changes to "Good". What will happen if test fails 1 or 2 times and after this it restores "Good" status? HostMonitor will not send a notification about failure (because test did not fail 3 times) but the program will send notification about restoring "Good" status. To avoid unnecessary "Good" action execution you can mark "Action depends on "bad" one" option and select "Bad" action. In this case HostMonitor will start "Good" action only if corresponding "Bad" action was executed.
Alex