Hi,
we do a lot of tests 24*7 which trigger an SMS to the admin in case of a bad result. Most SMS actions are scheduled 16*7 (from 6 a.m. to 10 p.m.) so that we have to deal with how to delay action in case of test failure during the night (topic similar to http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2974)
Our solution uses three actions in the action profile
1. (24*7) HMS-Script writes comment to commentline#9 if (('%Simple Status%'=='%DOWN') and (%Recurrences%==3 '))
2. (16*7) SMS is triggered if (('%Simple Status%'=='%DOWN') and ('%CommentLine%'>' '))
3. (16*7) HMS-script clears commentline#9
This seems to work but it obviously depends on the sequence in which the actions are performed (expression 2 must be evaluated before action 3 is performed). After some tests we suppose that the actions are performed in the same sequence as they were put in the list (which is not the sequence in which they are displayed in the list). I couldn't find anything in the manual about that topic.
Q1: In which sequence will the expressions and schedules for actions in an action list be evaluated?
Q2: In which sequence will the actions be performed?
Q3: Does action 2 always wait until action 1 is completely finished.
Q4: Is there a kind of an internal action ID and can I retrieve it?
Regards
Thomas
Sequence of actions in an action profile
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
HostMonitor checks alert conditions and executes actions (if both conditions return True) in creation order. So, if action1 was created (by operator) before action2, then action1 will be executed before action2.Q1: In which sequence will the expressions and schedules for actions in an action list be evaluated?
Q2: In which sequence will the actions be performed?
Actually actions displayed on the screen in the same order.
Q3: Does action 2 always wait until action 1 is completely finished
Depends on action. E.g. when HostMonitor executes "Generate reports", "Record HM log", "Log event", "SQL Query", "Run HM Script" actions, it waits for result before starting another action. While "Execute external program", "Send e-mail", "Send message to ICQ", "Send message to Jabber", "Send message to pager/beeper", "Stop/Start/Restart service", "Send SMS" actions can be executed at the same time.
Q4: Is there a kind of an internal action ID and can I retrieve it?
You cannot get that ID. Event if you can, how you will use it?
Regards
Alex
-
- Posts: 166
- Joined: Sat Apr 15, 2006 2:14 pm
- Location: Germany, Bavaria
Hi Alex and thanx for the info,
1. type of condition (standard, advanced, schedule)
2. in case of standard mode: Number of recurrences
3. Action Name
Regards
Thomas
IMHO the actions are displayed in this order:Alex wrote:Actually actions displayed on the screen in the same order.
1. type of condition (standard, advanced, schedule)
2. in case of standard mode: Number of recurrences
3. Action Name
As the ID represents the execution order and the display on the screen doesn'tAlex wrote:You cannot get that ID. Event if you can, how you will use it?
What about HTTP Request? We use it for the SMS!Alex wrote:Quote:
Q3: Does action 2 always wait until action 1 is completely finished
Depends on action.
Regards
Thomas
Yes, standard actions sorted by "Start when" parameter, then by name1. type of condition (standard, advanced, schedule)
2. in case of standard mode: Number of recurrences
3. Action Name
1) ID does not have anything to do with execution order.As the ID represents the execution order and the display on the screen doesn't
2) Its impossible (in general case) to predict execution order for advanced actions
HTTP request processed asynchroniouslyWhat about HTTP Request? We use it for the SMS!
Regards
Alex