Hi,
In one action profile, I would like to get notified when a status goes bad 5 times in a row, and then again with 5 good ones. Furthermore, I need to look at a commentline, to see if it should do something
So, in order to do this, I'm using the advanced mode. But then it's not possible to choose "Action depends on bad one" under the good status action
I have the expression like this:
('%SimpleStatus%'=='UP') and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning')
The problem is, that now I get send an sms, if bad was only one recurrence, and then 5 good.
Could it be possible to get the same functionality as with the standard mode?
Regards,
/Stoltze
Action profile issue
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Action profile issue
Could you try the following expression:Stoltze wrote:In one action profile, I would like to get notified when a status goes bad 5 times in a row, and then again with 5 good ones.
(('%SimpleStatus%'=='UP') or ('%SimpleStatus%'=='DOWN')) and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning')
I am afraid, no. "Standard mode" does not allows you to check the value in comment line.Stoltze wrote:Could it be possible to get the same functionality as with the standard mode?
Regards,
Max
Re: Action profile issue
KS-Soft Europe wrote:Could you try the following expression:Stoltze wrote:In one action profile, I would like to get notified when a status goes bad 5 times in a row, and then again with 5 good ones.
(('%SimpleStatus%'=='UP') or ('%SimpleStatus%'=='DOWN')) and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning')
To me there is no change between the 2 ways...? I need it to be 5 bad ones, send alarm, and then send alarm when 5 good tests.
I know that Max. But why is the field grayed out in Advanced mode?KS-Soft Europe wrote:I am afraid, no. "Standard mode" does not allows you to check the value in comment line.Stoltze wrote:Could it be possible to get the same functionality as with the standard mode?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Re: Action profile issue
Actually, foregoing expression make HostMonitor to send you alert when 5 consecutive "Bad" results occur and/or 5 consecutive "Good" results occur. Probably, I misunderstood word "again" in your request. So, do you need to receive just one alert, when 5 consecutive "Bad" occur and after that immediately 5 consecutive "Good" results occur?Could you confirm that?Stoltze wrote:To me there is no change between the 2 ways...? I need it to be 5 bad ones, send alarm, and then send alarm when 5 good tests.
Do you mean "Action depends on "Bad" one" option? This option only works with "Standard mode" actions.Stoltze wrote:But why is the field grayed out in Advanced mode?
Regards,
Max
Re: Action profile issue
Yes, thats correct.KS-Soft Europe wrote:Actually, foregoing expression make HostMonitor to send you alert when 5 consecutive "Bad" results occur and/or 5 consecutive "Good" results occur. Probably, I misunderstood word "again" in your request. So, do you need to receive just one alert, when 5 consecutive "Bad" occur and after that immediately 5 consecutive "Good" results occur?Could you confirm that?Stoltze wrote:To me there is no change between the 2 ways...? I need it to be 5 bad ones, send alarm, and then send alarm when 5 good tests.
If I could have done this in standard mode, then I would have checked the dependency. But now I can't do that. So the question is, if it's somehow possible to get the same functionality in advanced mode?
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
Now I understand. Thank you for the explanation. So, the only way to figure it out I see is to use %PreviousStatus% and %PreviousStatusDuration_Sec% variables. Your expresion should be like the following:
('%SimpleStatus%'=='UP') and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning') and ('%PreviousStatus%' == 'Bad') and (%PreviousStatusDuration_Sec% >= 1500) and (%PreviousStatusDuration_Sec% <= 1800)
You shoud aware of using %PreviousStatus% variable. Unlike 'LastStatus', 'PreviousStatus' variable reflects the real status, etc: No Answer, Bad, Not Resolved, etc. So, you should adjust the value according to the test. Also you should calculate the PreviousStatusDuration_Sec. Acording to the manual, PreviousStatusDuration_Sec represents the duration of the "PreviousStatus" in seconds. So, for instance, your test is performed every 5 minutes. 5 min = 300 sec. So, if the test fails 5 times in a row, it means 5*300 = 1500 sec. So, to "catch" 5 bad recurrences, we should use expression: (%PreviousStatusDuration_Sec% >= 1500) and (%PreviousStatusDuration_Sec% < 1800)
Regards,
Max
('%SimpleStatus%'=='UP') and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning') and ('%PreviousStatus%' == 'Bad') and (%PreviousStatusDuration_Sec% >= 1500) and (%PreviousStatusDuration_Sec% <= 1800)
You shoud aware of using %PreviousStatus% variable. Unlike 'LastStatus', 'PreviousStatus' variable reflects the real status, etc: No Answer, Bad, Not Resolved, etc. So, you should adjust the value according to the test. Also you should calculate the PreviousStatusDuration_Sec. Acording to the manual, PreviousStatusDuration_Sec represents the duration of the "PreviousStatus" in seconds. So, for instance, your test is performed every 5 minutes. 5 min = 300 sec. So, if the test fails 5 times in a row, it means 5*300 = 1500 sec. So, to "catch" 5 bad recurrences, we should use expression: (%PreviousStatusDuration_Sec% >= 1500) and (%PreviousStatusDuration_Sec% < 1800)
Regards,
Max
You're welcome..KS-Soft Europe wrote:Now I understand. Thank you for the explanation.

So, what we need here, is a new variable: "The-number-of-recurrences-of-previousstatus"
Then the line would be like this:
('%SimpleStatus%'=='UP') and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning') and ('%PreviousStatus%' == 'Bad') and (%NewVariable% >= 5)
And then this would fit tests with different test intervals..!

But, for now, I have changed into using 2 different alert profiles. This way I can use standard mode..

-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact: