Creating an automation policy

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

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 Create policy.

  3. Select the condition that triggers the policy to run:

    1. Event: An Instana event definition or a Smart Alert triggers this policy.
    2. Schedule: The policy is run automatically based on a schedule.
  4. If you select Event, complete the following steps:

    1. Click Add event condition.

    2. Select an event or a Smart Alert, then click Add event trigger.

    3. Set the policy type by selecting one or both of the following options in the Policy type field:

      • User initiated: The policy is run manually when an event is raised.
      • Automatic: The policy is run automatically when an event is raised or closed.
    4. If you select Automatic, 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.
  5. If you select Schedule, complete the following steps:

    1. Select a Start date.
    2. Select a Repeat option.
    3. Enter a Start time.
    4. Based on your Repeat selection, use the additional fields to configure the schedule.
  6. Click Next.

  7. Add an action for the policy:

    1. Click Add Action.
    2. Select an action for the policy from the catalog then click Add action.
    Note: You cannot configure documentation and manual actions to run automatically or on a schedule.
  8. Configure the action:

    Note: You must configure the action if you selected an event trigger with Automatic selected in the Policy Type, or if you selected to run the policy on a schedule.
    1. Click the Pencil icon for the action in the Action field.

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

      • Hosts limit (optional): Select the hosts on which the Ansible action is run. You can manually enter a host limit or select a tag if you want it to be derived from the event context. Multiple entries are allowed.

        Note: The Hosts limit field is displayed for only Ansible actions.
      • Target agent: Select the agent on which this policy runs. If the policy is triggered by an event, you can choose to run it on the agent that generated the event by selecting Triggering agent.

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

    3. Click Save.

  9. Click Next.

  10. Enter the policy details:

    • Enter a name and description for the policy.
    • Optional: Add tags to this policy.
  11. Click Create.

Policy dashboard

To view the policy dashboard, click the policy name in the policy table.

The policy dashboard displays the policy details, trigger information, action configuration, and action history for the selected policy.

Running the policy

  • For policies that have an event trigger:

    • When an event is raised that matches the conditions that are specified in the trigger, the policy appears in the Recommended actions 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 Recommended actions section.
    • If the policy is configured to run automatically, you can view its result on the Action history tab.
  • For scheduled policies:

    • These policies run automatically based on the schedule that is specified in the policy.
    • You can view results from the policy dashboard.