Action profile issue

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Action profile issue

Post by Stoltze »

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
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: Action profile issue

Post by KS-Soft Europe »

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.
Could you try the following expression:
(('%SimpleStatus%'=='UP') or ('%SimpleStatus%'=='DOWN')) and (%Recurrences%==5) and ('%CommentLine2%'=='Vagtordning')
Stoltze wrote:Could it be possible to get the same functionality as with the standard mode?
I am afraid, no. "Standard mode" does not allows you to check the value in comment line.

Regards,
Max
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Re: Action profile issue

Post by Stoltze »

KS-Soft Europe wrote:
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.
Could you try the following expression:
(('%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.

KS-Soft Europe wrote:
Stoltze wrote:Could it be possible to get the same functionality as with the standard mode?
I am afraid, no. "Standard mode" does not allows you to check the value in comment line.
I know that Max. But why is the field grayed out in Advanced mode?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Re: Action profile issue

Post by KS-Soft Europe »

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.
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:But why is the field grayed out in Advanced mode?
Do you mean "Action depends on "Bad" one" option? This option only works with "Standard mode" actions.

Regards,
Max
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Re: Action profile issue

Post by Stoltze »

KS-Soft Europe wrote:
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.
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?
Yes, thats correct.
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?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

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
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

KS-Soft Europe wrote:Now I understand. Thank you for the explanation.
You're welcome.. :)


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..! :D

But, for now, I have changed into using 2 different alert profiles. This way I can use standard mode.. :-?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

Stoltze wrote:So, what we need here, is a new variable: "The-number-of-recurrences-of-previousstatus"
Ok. I have added your request into "to do" list. Low priority.

Regards,
Max
User avatar
Stoltze
Posts: 174
Joined: Tue Feb 03, 2004 1:58 am
Location: Denmark

Post by Stoltze »

KS-Soft Europe wrote:
Stoltze wrote:So, what we need here, is a new variable: "The-number-of-recurrences-of-previousstatus"
Ok. I have added your request into "to do" list. Low priority.
Thnx Max.. :)
Post Reply