Running actions
Running actions
You can run actions directly from an event after you create an automation policy that associates the action with the event.
To run an action from an event:
- Go to Events > Issues.
- Click an Issue. The dashboard for the issue is displayed.
- On the Automation Policies tile, click Run. The dialog box "You have chosen to run
from your Action Catalog" is displayed. - Select the target agent for the action to run. If the host system of the event can be mapped to a target agent, the target agent is marked as Triggering Agent, which indicates you can run this action directly on the affected host. The options include all the agents that have an enabled action sensor that matches the action type.
- Optional: For the Ansible actions, select one or more hosts of the event from the Hosts limit list or enter the details for another host. For each host in the list, the fully qualified hostname and IP address is shown.
- Set the parameters.
- Click Run.
If you started an action run, you can see a link to access one of the following items:
- Action History if you have the View action history permission
- Action log for the action.
To access the associated URL from the event context for an associated Documentation Link action, select Launch.
To test your action outside an event instance, run it from Action Catalog after specifying Target Agent.
Parameter specification
You can update any parameter values that are defined for the actions in the Parameters section.
- The default value for a parameter will be filled in if the parameter is specified when you define the parameter for the action definition.
- Any parameters that are marked as Required must be given a value.
- Any parameters that are marked as Hidden will not be visible.
- If a parameter is marked as Dynamic, the value of the parameter is derived from the event context if available. If no value is displayed for the dynamic parameter, the path in the dynamic parameter specification is not resolved. You can modify the value.
After you run an action, you can see a link to access the Action log page for that run of an action. For an associated Documentation Link action, you can select Launch to quickly access the associated URL from the event context.
To test your actions independent of an event, complete the following steps:
- Go to Automation > Action Catalog.
- Click the Test icon against an icon. The "You have chosen to test Ansible: < name of the action > from your Action Catalog" dialog is displayed.
- From the Target Agent list, select a target to run the test.
- Click Test Action.