Creating an automation policy

An automation policy associates a trigger to an action in your catalog. A trigger can be either an Instana event definition or a Smart Alert. You can configure a policy to run manually, automatically, or both.

Prerequisites

Ensure that you have the Configuration of automation policies permission. For more information, see Managing user access.

Procedure

To create a policy, complete the following steps:

  1. From the navigation menu in the Instana UI, click Automation.

  2. On the Policies tab, click New Policy.

  3. Add policy details:

    1. Enter a name and description for the policy.
    2. Optional: Add tags to this policy.
  4. Add an event trigger. The trigger is the Instana event or Smart Alert that defines the initial conditions that must be met for the policy to apply.

    1. Click Add Event Trigger.
    2. Select an event or Smart Alert.
    3. Click Apply.
  5. Set the policy type by selecting one or both of the following options in the Policy Type field. The policy type determines how a policy is run.

    • Manual: The policy is run manually when an event is raised.
    • Automatic: The policy is run automatically when an event is raised.
  6. If you select the Automatic option, select the type of entities to which the policy applies. Select one of the following options from the list in the Apply on field:

    • All available entities: The policy runs for all entities in your application or system landscape with no restrictions.
    • Selected entities (Dynamic Focus query): The policy runs only on entities that match the query that is defined in the Dynamic Focus Query.
  7. Add an action for the policy:

    1. In the Action Configuration field, click Add Action.

    2. Select an action for the policy from the catalog.

      You cannot configure documentation and manual actions to run automatically.

    3. Click Add Action.

  8. Configure the action:

    If Automatic is selected in the Policy Type, you must configure the action.

    1. Click the Pencil icon for the action in the Action field.

    2. In the Action configuration window, complete the following fields:

      • Hosts Limit (Optional): Select the hosts on which the Ansible action is run.

        The Hosts Limit field is displayed only for Ansible actions.

      • Target Agent: Select the agent on which this policy runs. If you select Triggering Agent, the policy runs on the agent that raised the event.

      • Parameters: Set the values for your action parameters. If the policy runs automatically, you must provide values for all required parameters.

  9. Click Apply.

Running the policy

When an event is raised that matches the conditions that are specified in the trigger, the policy appears in the Automation Policies section of the Incident or Issue details page on the Events dashboard.

If the policy is configured to run manually, you can run it from the Automation Policies section. If the policy is configured to run automatically, you can view its result on the Action History tab on the Automation dashboard.