Logic in action profiles

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

Logic in action profiles

Post by Stoltze »

Hi,

How will AHM treat good actions in this action profile:

Bad:
1. 3 bad, restart service
2. 10bad, send email

Good:
1->1. 3good, send email, service okay again, because of automatic restart
2->2. 10good, send email, service okay again

So, action 1 good, depends on 1 bad, and the same for number 2..

Scenario:
Test fails
After 3 bad, try to restart service
Restart service fails for some reason
After 10 bad, email is sent
After 20 bad, server is manually restarted

Now to the question:
Will I recieve both emails..? Since both bad status actions have been executed..

Or is there som logic, that will ensure, that only number 2 is send..?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If you setup 2 good actions, both actions will be executed.

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

Post by Stoltze »

Okay, thnx Alex...
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

However I do not understand why do you need 2 "good" actions that do the same job - send e-mail that informs you that everything is Ok.
Why?

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

Post by Stoltze »

KS-Soft wrote:However I do not understand why do you need 2 "good" actions that do the same job - send e-mail that informs you that everything is Ok.
Why?
Because I wanted to send different emails..
1. Service has been restarted automatically, nothing to worry about
2. Automatic restart failed. Please check log etc

Basically something like that.. :)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

1 bad and 1 good "send e-mail" action will do that.
Why do you need 2nd good action?

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

Post by Stoltze »

I would like to write different message to reciever, depending on whether the problem was solved by automatic restart, or by manual intervention..

Does this makes sence...? :)
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Then you may use 2 bad actions to record message description into some file (e.g using "Execute external program action" and simple BAT file) and use single good action to send this file as attachment or body of the mail :roll:

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

Post by Stoltze »

Perhaps yes.. Will think about it.. Thnx for your answers.. :)
Paul_NHS
Posts: 59
Joined: Wed Feb 25, 2009 6:17 am

Post by Paul_NHS »

I use these for checking/re-starting a failed service.

BAD
Action: Start After: Repeat
Start Service: 1: 1
Set new test interval: 1: 1
Send email: 2: 1
Set new test interval: 2: 1

GOOD
Action: Start After: Repeat
Set new test interval: 1: 1

On failure attempt to restart service.
Set the test time interval to 2 minutes so the test will check if the service has restarted.
If test still fails, send email and restore normal test inteval.

cheers, Paul
Post Reply