Page tree
Skip to end of metadata
Go to start of metadata

Action Output Monitors allow you to automatically scan an action's output for certain content, and perform various actions if that content is found. For example, you can have an action fail if text like "warning" is found - even though normally that action would succeed.

Only output created while the action is running is monitored - output from the BeforeAction and AfterAction script events is not monitored.

To edit Action Output Monitors, go to the Runtime property page and click on the ellipsis (...) edit button for Output Monitors.

On this page:

 

  • Click the "Add New Output Monitor" button to add an output monitor to the action. There is no limit on the number of monitors an action can have. All output monitors operate independently of each other.
  • Click "Remove Monitor" to remove a monitor from the action.

Monitors

Search String

This is the string to search for in the action output. In the example above, the monitor will match any line that contains the string "Warning :".

Matches cannot be made over multiple lines of output. If you need to match across multiple lines, it is recommended that you log the action output to a variable and use the Text Find/Replace action.

Case Sensitive

If this box is checked, output matching will be case sensitive.

Use Wildcards

If this box is checked, the search string can contain the wildcard characters "*" and "?". * will match any number of characters (including none), whereas ? will match any single character.

Whole Words Only

If this box is checked, the search string must match a whole word - not part of a word.

Regular Expression

If this box is checked, the search string is treated as a regular expression. This checkbox cannot be used along with "Use Wildcards" or "Whole Words Only".

Behaviour

The Behaviour dropdown menu allows you to choose what happens if this monitor matches some output from the action.

Fail action if match found

If the search string is matched then the action will always fail, regardless of the action result status. Any matched lines will be highlighted as "Error" output.(*)

Fail action if no match found

The action will always fail (regardless of result status), unless at least one match for the search string is found.(*)

Succeed action if match found

If the search string is matched then the action will always succeed, regardless of the action result status. Any matched lines will be highlighted as "Success" output.(*)

Succeed action if no match found

The action will always succeed (regardless of result status), unless at least one match for the search string is found.(*)

Suppress any matching log messages

Any line of output which matches will be suppressed from the action's log output.

Suppress any non-matching log messages

Any line of output which does not match the search text will be suppress from the actions log output.

Terminate action if match found

Any line of output which matches will cause the action to terminate and return a failure result.

Save First / Last Match to Variable

(For these behaviours, a dropdown appears allowing you to choose a variable name.)

The line which matches the search string will be written to a variable when the action completes. In the case of multiple matches, "First Match" means that only the first match will be written, "Last Match" means only the last match.

If there are no matching lines, the variable is not written to.

Save All Matches To Variable

(For this behaviour, a dropdown appears allowing you to choose a variable name.)

Any string which matches the search string will be written to a variable. In the case of multiple matches, each match will be written on a new line. If there are no matches, the variable will be set to an empty string.

Save Match Count To Variable

(For this behaviour, a dropdown appears allowing you to choose a variable name.)

The total number of matching lines will be written to a variable.

* Using multiple monitors with fail/succeed

If there are multiple monitors which force the action to both fail and succeed, and both find matches in the action is output, then the monitors are applied in the order they are shown in the dialog box, ie if a "Succeed" monitor is triggered followed by a "Fail" monitor, the action will fail. The action log output will show the status of both monitors, in order.

The AfterAction script event has the opportunity to futher modify the action result.

Monitors are applied live

Monitoring is applied to the output immediately as it is received from the action, before the OnStatusMessage script event. However, results (like setting variables) are not applied until the action finishes running. If you use variable references in the search string, be aware that the variable values may change as the action runs.

  • No labels