Intelligent Remediation: live action generation with watsonx (public preview)

Instana Intelligent Remediation uses IBM watsonx to drive incident remediation with generative AI. You can input the Instana event details to a large language model (LLM) as a prompt. The LLM can generate a manual action, which is a set of steps to diagnose or remediate the event, or a script action based on a manual step. You can further configure these actions and add them to the action catalog. These actions can also be applied to an automation policy to link the action to the event for convenient reference.

For some frequently-occurring built-in events, predefined curated actions are available for selection.

Artificial Intelligence (AI)-generated actions are not run automatically against a target system. In addition, AI can sometimes make mistakes. Therefore, you must always review, verify, and test these actions before using them in an automation policy or on production systems.

Instana Intelligent Remediation with watsonx is offered as a public preview for all SaaS environments.

watsonx integration

The generative AI of Intelligent Remediation uses the ibm/granite-3-8b-instruct large language model (LLM) for manual actions. This chat-based model uses event data as an input prompt and generates recommended steps to diagnose or remediate the problem.

The generative AI of Intelligent Remediation uses the ibm/granite-34b-code-instruct large language model (LLM) to create bash scripts from manual steps. The LLM accepts a manual step as an input prompt and generates the required script to perform the specified instructions.

Notes:
  • The required connections to IBM Cloud and watsonx are provided by Instana. No additional sign-up or registration is required.
  • The data that is sent to watsonx is not stored outside of Instana.
  • No model training is performed on any data that is passed to watsonx.
  • The results that are generated from Instana and watsonx might have errors and you must verify them before using in production.

Prerequisites

To use Instana Intelligent Remediation with watsonx, the following prerequisites must be met:

  • Instana must be deployed on a SaaS environment.
  • You must enable the following Automation RBAC permissions:
    • Access type: Owner (enables configuration of new automation actions)
    • Configuration of automation policies (if policy creation is required)

Generating manual actions with watsonx

For any occurrence of a built-in event, custom event, or Smart Alert, go to the Recommended Actions tab of the Automation section. Click the link to Generate with watsonx.

To generate a manual action for any occurrence of a built-in event, custom event, or Smart Alert, complete the following steps:

  1. In the Instana UI, go to Events > Incidents or Events > Issues.
  2. Open an incident or issue.
  3. In the Recommended Actions tab, click Generate with watsonx.

Generate with watsonx

There are three steps for generating a manual action with watsonx:

  1. Generate an action
  2. Configure the action
  3. Create action or create action and policy (optional)

Generating the action

On the "Step 1: Generate an action" page, the configuration details, such as Event name, Event description, and affected Event entity type are automatically displayed from the current event information. The event configuration details create the AI prompt to generate a manual action.

  1. To generate a prescription, or set of manual steps to remediate, mitigate, or diagnose the problem, click Generate Action.
  2. Review the results, and click Next. If required, you can improve the results by modifying the prompt input fields and clicking Generate Action again. Provide appropriate details to achieve better results from watsonx.

Generated manual action

Using pre-generated actions

For several commonly-occurring built-in events, you’ll see tabs for both Live generation and Built-in actions on the first page

  • The Built-in actions tab contains a list of pre-generated and curated actions related to the event.

  • These pre-generated actions cannot be directly used in a policy. They can be copied and curated into a new action, and subsequently added to a new policy if desired.

  • Select an action from the list, and then click Next to proceed to the second page.

Built-in actions

Configure the action and policy

To configure the new action, and optionally create an automation policy, complete the following steps:

  1. In Step 2: Configure action, update the Name, Description, Tags, and Content.

  2. Click Next.

  3. Optional: Enter the name, description, and tags to include the new action with the event from which it is generated. For more information, see automation policies.

  • To create both action and policy:
    1. Enter policy details such as Name, Description, and Tags.
    2. Click Create action and policy. The action is created successfully.
  • To create the new action without adding a policy, click Create action. The action is created successfully.

Viewing the action and policy

- The new action is available in the [Action Catalog](../action-catalog.html) tab in the **Automation** section of Instana UI.
- If a policy is created, the new policy is available on the **Automation Policies** tab of the incident. You can click the **View** button to see the steps.

View action

Generating script actions with watsonx

To select any manual action and generate a script, complete the following steps:

  1. From the navigation menu in the Instana UI, click Automation.
  2. On the Action Catalog tab, select Manual in the Type field.
  3. To create a script action, do one of the following:
    • Click an action item from the Actions table, and then click the arrow on Generate a script from a manual action step.
    • Click the Options overflow, and then click Generate script.

There are three steps for generating a script action with watsonx:

  • Select a step from manual action
  • Generate the script
  • Create script action or export to external source

Select a step from manual action

To generate a script from the manual action, complete the following steps:

  1. On the "Step 1: Select step" page, select a step.
  2. Click Next.

Select step

Generating a script

In the Step 2: Generate a script page, modify the selected step as required. The step details are used to form the AI prompt to generate a new script action.

To generate a script action, complete the following steps:

  1. Select one of the following interpreters for script generation: Bash or Ansible.

  2. Optional: In the Prompt field, modify the selected prompt text.

    Modify the prompt details to improve the results.

  3. Click Generate.

  4. Review the generated code and click Next.

The following images display the generated bash and Ansible scripts:

Generated bash script
Figure 6. Generated bash script

Generated Ansible script
Figure 7. Generated Ansible script

Creating a script action

To create a script action, complete the following steps:

  1. On the "Step 3: Create action or export to external source" page, select "Create an action" option.
  2. Enter Name, Description, and Tags.
  3. Optional: Modify the script content before saving it to the catalog.
  4. Click Create action. The action is saved in the action catalog.
Notes: The available options for storing scripts are as follows:
  • For Bash scripts:
    • Save the script in the catalog
    • Export it to an external source (GitHub or GitLab)
  • For Ansible scripts:
    • Export to an external source (GitHub or GitLab)

The following image displays how to create a script action:

Create action
Figure 8. Create action

Exporting the script to external source

You can export the generated script to a GitHub repository or GitLab project.

  1. On the "Step 3: Create action or export to external" page, select Export to GitHub or Export to GitLab.
  2. Select a target agent with action github or action gitlab sensor enabled.
  3. Enter Repository, Branch, Commit message, Target branch and File path.
  4. Optional: Modify the script content before exporting it.
  5. Click Export. The script is exported and a new pull request is created.
  6. Optional: Once the pull request is approved and merged, you can create an action script in action catalog by using the exported file URL.

The following image displays how to export script to a GitHub repository:

Export script to GitHub repository
Figure 9. Export script to GitHub repository