- Action types
- Action parameters
- Associating actions with events and Smart Alerts
You can create, edit, and delete actions to diagnose and remediate events. To manage actions, click Automation > Action Catalog. The defined actions are displayed. You can apply tags to each action for Instana to use these tags in its action recommendations.
You can create three types of actions:
Documentation link: Access relevant documentation to diagnose or remediate a known issue directly from an event context.
Script: Add an automation script that can run on your agent by using the script action sensor.
You can run scripts on your agent on Linux and Windows operating systems, but on Windows you can run only Windows batch scripts, PowerShell scripts, VBScript, and Python scripts. You can use any syntax and commands that are supported on your target agent system in the script.
HTTP: Add HTTP calls to invoke webhooks or other REST API on your agent by using the HTTP action sensor.
You can also import Ansible playbooks from your
Ansible Automation Controller as Ansible actions by using the Ansible action sensor. You cannot delete Ansible actions if they
are imported. You can only update
Value Type, and
Default Value of the parameter.
You can configure input parameters for each action from the action definition.
Dynamic parameter types are supported.
- Static: Contain a static value that can be given a default value, and the value can be optionally updated when the action is run.
- Vault: Derive the value from a configured Hashicorp Vault on a target agent. You must provide both the Secret Path and Secret Key to dynamically access the value at runtime.
- Dynamic: A set of values that are derived from the monitored infrastructure that is related to the issue based on a tag. The
Dynamicparameters are automatically detected, and they continuously update the relations of the monitored system by using Instana's unique Dynamic Graph.
- Default value: Optionally define a default value for a static parameter.
- Hidden: Optionally hide the value at runtime. If it's specified, you need to set a default value.
Using action parameters
In the action definition page, you can access the input parameters in your actions as follows:
- Parameter substitution: Reference a defined parameter in your action by using the substitution format
@@parameter_name@@. The action sensors will replace the string with the action parameter value when the action is run.
... echo "@@parameter_name@@" ...
- Environment variable: The script action sensor will define an environment variable named
$parameter_namethat can be accessed directly in an action when the action is run. This is only available for script action types.
... echo $parameter_name ...
Associating actions with events and Smart Alerts
You can associate actions with events and Smart Alerts. To associate actions with events and Smart Alerts, complete the following steps:
- Go to Automation > Action Catalog.
- Click an action. The Configure Action:
pane is displayed.
- Optional: Associate the action with events:
- In 4. Associate Events, click Add Events. The Add Events dialog is displayed.
- Select the events that you want to associate with the action.
- Click the Add Events button.
- Optional: Associate the action with Smart Alerts:
- In 5. Associate Smart Alerts, click Add Smart Alerts. The Add Smart Alerts dialog is displayed.
- Select the Smart Alerts that you want to associate with the action.
- Click Select Events.
- Click Save.
Similarly, you can associate actions with application Smart Alerts by clicking Add Smart Alerts. Then, you can see a modal that provides a list of application Smart Alerts that you can associate to this action. After you select the Smart Alerts, click Select Smart Alerts within the modal to save your changes. The association is saved after the action is saved.