Alert Profile and Expressions

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
r00t-shell
Posts: 9
Joined: Tue Jan 09, 2007 8:15 am

Alert Profile and Expressions

Post by r00t-shell »

Need some understanding of processes within the software.

I only want one notification per folder - regardless of what, or how many items have failed in a folder.

From my understanding i need to have a master test with an expression, and an alert with an expression but the examples i've seen do not make sense. Can i get an quick example to perform this function?
Yoorix
Posts: 177
Joined: Wed Dec 14, 2005 8:28 am

Post by Yoorix »

I think, you may figure it out in a following way: in each folder you have to create one "dummy" test, for instance ping 127.0.0.1, and assign to this test an action profile with advanced mode action. You may use "%FolderCurrent_BadTests%" variable in expression, e.g. (%FolderCurrent_BadTests% > 0).

%FolderCurrent_BadTests% - Number of the test items (in the folder) those have "Bad" status
http://www.ks-soft.net/hostmon.eng/mfra ... oldermacro

No action profiles should be specified for the other tests in the folder.

BR,
Yoorix
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

No, this will not work. (%FolderCurrent_BadTests% > 0) means action should be started every time there is at least one bad test, so you will receive alerts again and again until all tests restore good status.

There are 2 possible solutions:

1) use additional dependant test (dependand, not master) with expression like (%FolderCurrent_BadTests%==0) or ((%FolderCurrent_BadTests%==1) and ('%SimpleStatus%'=='DOWN')) and assign alert profile with "standard" action to this test
Please read the following topic for details:
http://www.ks-soft.net/cgi-bin/phpBB/vi ... hp?p=18147

2) another solution (no additional tests required): assign alert profile to each tests within the folder, use "advanced" mode action with expression like %FolderCurrent_BadTests%==1 for this action
http://www.ks-soft.net/cgi-bin/phpBB/vi ... hp?p=17851

Regards
Alex
r00t-shell
Posts: 9
Joined: Tue Jan 09, 2007 8:15 am

Post by r00t-shell »

Ok that make sense.

It's either or, not a combination of the two.

THat would explain why it worked on moment, then not the next when i implemented an alert profile and also used the expression.

Let me ask you this, of the two examples given what are the differences? Pro/Cons of each.

Let me give this whirl.

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

Post by KS-Soft »

Let me ask you this, of the two examples given what are the differences? Pro/Cons of each.
Just different ways to get the same result. I do not see any obvious advantages or disadvantages of each method.

Regards
Alex
Post Reply