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
Create the XML File
- Create a custom.xml file that describes the location and name of your custom action script. See Contents of the custom.xml File.
- 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
- After you have installed the script and the custom.xml file, restart the Controller.
- Verify the script manually. To verify the script:
- Open a command-line console on the Controller host machine.
- 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.