Manage Custom Actions for Splunk AppDynamics Self Hosted Virtual Appliance

In Virtual Appliance, follow these instructions to add, delete, verify, and dry run the custom actions:
  • To add custom actions, run the following command:
    One Action
    1. Create a custom action folder in the /home/appduser/ with its script. For example, Jira folder with script1.sh.

    2. Run the following command:
      appdcli controller actions_add <directory_name> <script_name>

      Example:

      appdcli controller actions_add /home/appduser/Jira script1.sh

      In this example, the command copies the Jira folder to /var/appd/data/custom-actions/actions and updates the custom.xml file in the same path.

    Multiple Actions
    1. Create the custom_action folder in /home/appduser.

    2. Create the actions folder. In this folder, create action folders with their scripts.

      For example, you may create Jira and Bugzilla folders with scripts in the actions folder.

    3. In the actions folder, create the custom.xml file. See Contents of the custom.xml File on how to create contents in the XML file.

    4. Run the following command:
      appdcli controller actions_add <directory_name> --bulk=true
      Example:
      appdcli controller actions_add /home/appduser/custom_action --bulk=true
  • To delete custom actions, run the following commands:
    One Action
    appdcli controller actions_delete <action_name> 
    Example:
    appdcli controller actions_delete Jira
    Multiple Actions
    appdcli controller actions_delete --all=true
  • To verify the custom actions, run the following commands:
    One Action
    appdcli controller actions_verify
    Multiple Actions
    appdcli controller actions_verify --directory=<directory_path>
    Example:
    appdcli controller actions_verify --directory=/home/appduser/<custom_action_folder>
  • To dry run the custom actions, perform the following commands:
    1. Run the following commands:
      One Action
      appdcli controller actions_run <action_name>
      Multiple Actions
      appdcli controller actions_run --all=true
    2. Print the custom.xml file in the table format:
      appdcli controller actions_run --print_xml=true
    3. Print an action name in the Controller:
      appdcli controller actions_run --print_actions=true
  • (Optional) Reset the Controller the with custom actions:
    appdcli controller actions_sync

Troubleshoot Custom Actions

Sometimes you may face issues related to custom actions in Virtual Appliance. This section provides solution to troubleshoot these issues.

Custom Actions Do Not Appear in the Controller UI

When you try to create an action in the Controller UI, it may not display the custom actions that you have uploaded to the controller. To troubleshoot this issue,
  1. Log in to server where you have hosted the Controller.

  2. Go to the /var/appd/data/custom-actions folder.

  3. Ensure the custom.xml file has execute permissions.