Running actions
You can run an action in two ways: either by using the recommended actions directly from the event, or by creating an automation policy that associates the action to the event.
To run an action or policy from the recommended actions in an event, complete the following steps:
- Go to Events > Issues or Events > Incidents.
- Click an Issue or Incident. The dashboard for the selected one is displayed.
- Open the Recommended Actions tab.
- You notice that policies appear at the beginning of the Recommended Actions table, followed by recommended actions.
- From the overflow menu of a policy or action, click View and run policy if it is a policy, or click View and run action if it is an action . The system displayes the "Run action actionName" dialog box.
- Select the target agent to run the action. If the host system that is associated with the event maps to a target agent, the target agent is marked as the Triggering Agent. This indicates that you can run this action directly on the affected host. The available options include all agents that have an enabled action sensor that matches the action type.
- Optional: For Ansible actions, you can select one or more hosts from the hosts limit list or enter the details for another host. The list displays the fully qualified hostname and IP address for each host in the list.
- Set the necessary 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.