Expressions Help

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
Bulldog98
Posts: 23
Joined: Fri Sep 21, 2007 3:29 pm

Expressions Help

Post by Bulldog98 »

I need help with an expression as I am unable to get it to work the way I would like it to. I would like to use the "Optional Status Processing" to control the alerts of my performance monitor tests dependant on the reply and number of recurrences.

The performance monitor results are as follows:

Healthy = <5
Warning = 5 - 49 for 5 minutes
Critical = >50 for 5 minutes

The test executes every minute.

I would like to configure the tests so that they perform a bad status alert at a result of 50+ (but only on 5 reccurences), a warning if the result is between 5-49 with 5 recurrences and okay status at less than 5.

The test is set to bad status at 50+ result and I would like to configure it to set the status to normal if a result of 5+ is returned until it has occured at least 5 times before processing warning and bad status.

Hope that makes sense. :)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I think behaviour that you need is described in example #4
www.ks-soft.net/hostmon.eng/mframe.htm# ... processing
Example #4: you may configure HostMonitor to use Normal status for 1st and 2nd failed probes, use Warning status for 3rd and 4th failed probes and set Bad status starting from 5th failed check:
- enable "Use Warning status" option and provide (%FailureIteration% > 2) and (%FailureIteration% < 5) expression
- enable "Use Normal status" option and use expression like (%FailureIteration% > 0) and (%FailureIteration% < 3)
In your case use expressions like
- (%FailureIteration% > 4) and (%FailureIteration% < 50)
- (%FailureIteration% > 0) and (%FailureIteration% < 5)

Regards
Alex
Bulldog98
Posts: 23
Joined: Fri Sep 21, 2007 3:29 pm

Post by Bulldog98 »

KS-Soft wrote:I think behaviour that you need is described in example #4
www.ks-soft.net/hostmon.eng/mframe.htm# ... processing
Example #4: you may configure HostMonitor to use Normal status for 1st and 2nd failed probes, use Warning status for 3rd and 4th failed probes and set Bad status starting from 5th failed check:
- enable "Use Warning status" option and provide (%FailureIteration% > 2) and (%FailureIteration% < 5) expression
- enable "Use Normal status" option and use expression like (%FailureIteration% > 0) and (%FailureIteration% < 3)
In your case use expressions like
- (%FailureIteration% > 4) and (%FailureIteration% < 50)
- (%FailureIteration% > 0) and (%FailureIteration% < 5)

Regards
Alex
Sorry, I think that you misunderstood me first time. What I mean is that I would like the "Use Warning Status if" and "Use Normal Status if" fields to contain expressions that can control the alerts as follows:

If the "Reply" is between 4 and 49 for more than 5 times in a row then I would like to report a "Warning" status.

If the "Reply" value goes above 49 for more than 5 times in a row I would like to report a "Bad" status.

If the "Reply" value is between 1-3 for more than 5 times in a row then I would like to report a "Normal" status.

If the "Reply" value is 0 then it will be "Good" status.

Any ideas?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Complicated conditions... However your algorithm is incomplete.
What status should be used when "Reply" value is between 1-3 for 1,2,3,4 5 times in a row?
What status should be used when "Reply" is between 4 and 49 for 1-4 times in a row?
What status should be set when "Reply" value goes above 49 for 1-4 times in a row?
Sorry, I cannot provide good solution

Regards
Alex
Bulldog98
Posts: 23
Joined: Fri Sep 21, 2007 3:29 pm

Post by Bulldog98 »

KS-Soft wrote:Complicated conditions... However your algorithm is incomplete.
What status should be used when "Reply" value is between 1-3 for 1,2,3,4 5 times in a row?
What status should be used when "Reply" is between 4 and 49 for 1-4 times in a row?
What status should be set when "Reply" value goes above 49 for 1-4 times in a row?
Sorry, I cannot provide good solution

Regards
Alex
I would like the status to be "Normal" at all the "Reply" values listed above. If at all possible. If this is impossible then is there some other way I could achieve a similar solution? or is there a solution that would come close to what I would like?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I would like the status to be "Normal" at all the "Reply" values listed above
Are you sure?
E.g. test reported 99 (bad) for several times, then Reply changed to 45 (warning). Status should be Normal??
If at all possible
Its impossible. HostMonitor does not operate with such historical data. It operates with status, previous status, last status, reply, last reply, recurrences, current status iteration and failure iteration.
http://www.ks-soft.net/hostmon.eng/mfra ... .htm#macro

You may use additional statuses (Warning and Normal) to separate replies (value) or recurrences (# of probes with specific value) but ... 3 levels of reply value + 2 levels for duration? Impossible

Regards
Alex
Post Reply