Operation Manager 0.27.0 (full version)
 
Table of Contents
Start
Table of Contents
1. Conventions
2. General information about David system
3. Terminology
4. Installation
5. Operation Manager requirements
6. Installation
7. General information
8. Graphic Notifications Server (dgnsd)
9. Sound Client (sndc)
10. Access to the SNMP Trap Interface (damsnmpti)
11. SNMP Trap Analyser (damsnmptaud)
12. Access to the SNMP Data Interface (damsnmpdi)
13. SNMP Data Analyser (damsnmpdaud)
14. Cases Database Unit (damadbud)
15. Cases Service Unit (damcsud)
16. Buttons the most often used in Web applications
17. Recorded Operation Browser
18. Pending Operation Browser
19. Graphic Notifications Presenter (xdgnp)
 
 

15.8. Data return by running actions (programs)

damcsud expects that each running action (program) can print a result of its work on its stdout. If nothing is printed on stdout, the action can't affect on a case state, for which it was run.

The work result of the action is printed as text lines. Each line corresponds with the single event included in a case or if the line consists of a single word: opened, it means, that a case should be marked as opened (next actions, that will be run for this case will receive an --opened argument). Another two exceptions are the lines begining from the words closing-reason and closed-by. In the first case the text following after keyword will be remebered and next, it will be passed successive actions as an argument of --closing-reason option. Similar situation is in the second case, where the remembered identifier will be an argument of --closed-by option for succeccive actions. Each line included in a single event consists of two items: an event identifier (an argument of each --event-id option) and a code, that is a value of long type (32-bit signed number). If the code is a positive value or zero, the event is set as the active state. Otherwise its state is set as passive. From all codes for each event which an action has generated, the maximum code is selected but it isn't lower then -1 and it's treated as a return code of this action.

If the return code is a positive number or zero, a modification time of a given case is set as current time from which a number of seconds equals a return code of the action is added (i.e. a modification time of a given case is elder then current time about number of seconds equals a return code of the action).

At the end of a return code of the action is saved for a given case.