Create a Custom Action for Splunk AppDynamics On-Premises

Create the Script

For each custom action that you want to implement, create an executable script (.bat extension for Windows, .sh extension for Linux) that can accept and process the parameters passed to it by Splunk AppDynamics On-Premises. See Information Passed to the Custom Action Script for details on the parameters.

For each script:

  • Set correct executable permissions for the shell scripts in a Linux environment. For example, chmod 770 script1.sh.
  • Ensure that the script file has the correct character encoding. This is especially important when creating a Unix shell script on a Windows machine.

Install the Script on an On-Premises Controller

To install the script on an on-premises Controller:
  1. At the top level of the Controller installation directory, create a directory named custom with a sub-directory named actions.
    <controller_home>/custom/actions
  2. In the <controller_home>/custom/actions directory, create a subdirectory for each custom action script that you will install. For example, for an action that interfaces with a JIRA system.
    <controller_home>/custom/actions/jira
  3. Move the script to the appropriate subdirectory that you created.

Create the XML File

  1. Create a custom.xml file that describes the location and name of your custom action script. See Contents of the custom.xml File.
  2. For an on-premises Controller, move the file to the <controller_home>/custom/actions directory. For a SaaS Controller, contact customer support for instructions.

Verify the Script on an On-Premises Controller

  1. After you have installed the script and the custom.xml file, restart the Controller.
  2. Verify the script manually. To verify the script:
    1. Open a command-line console on the Controller host machine.
    2. Execute the script file from the command line console.

Create the Custom Action

To arrange how a custom action will be triggered, see Custom Actions.