Splunk® Add-on Builder

Splunk Add-on Builder User Guide

This documentation does not apply to the most recent version of Splunk® Add-on Builder. For documentation on the most recent version, go to the latest release.

Import and export an add-on project

Each add-on you create in the Splunk Add-on Builder has a corresponding project that contains the configuration settings. You must have access to this project in order to modify certain parts of your add-on, including data inputs or field extractions.

Export the add-on project as a TGZ file in order to import the project file to a different instance of Splunk Enterprise running Add-on Builder. This lets you share your add-on project or modify your add-on using a different computer than the one you used to develop the add on. You can only import and export projects for add-ons that were created in Splunk Add-on Builder.

As a best practice, export frequently to secure your work.

There are two ways to import and export add-on project: Splunk Web or a migration tool provided by the Splunk Add-on Builder.

  • Splunk Web provides a simple process and the recommended path for migrating most add-ons. The exported file is gzipped.
  • The migration tool provided by Splunk Add-on Builder lets you automate the process or for code repository check-in. The exported file is an extracted folder.

Import an add-on project using Splunk Web

  1. On the Splunk Add-on Builder home page on the Created with Add-on Builder tab, click Import Project.
  2. Navigate to the add-on TGZ project file and click Open.

Export an add-on project using Splunk Web

  1. Open the Splunk Add-on Builder home page on the Created with Add-on Builder tab.
  2. select the add-on and click Export.

Import or export a project using the migration tool

Run the shell command migration tool project_migration_tool under $SPLUNK_HOME$/etc/apps/splunk_app_addon-builder/bin/aob/aob_tools.

Arguments:

  -h, --help  Show the help of the migration tool and then exit
  -l,--log_level  {DEBUG,INFO,WARNING,ERROR}  Log level of the migration tool. Default:INFO
  -o, --output_dir  The output directory to export the project to.
  -t, --ta_name  The project name of which you want to import/export.
  -u, --user  Splunk user name. Default:admin
  -p, --password   Splunk password. Default:changeme
  -s, --splunk_web   Splunk platform URL. Default: http://localhost:8000
  -a, --action {export,import}    The operation you want to do. Default:export
  -i, --input_directory  The source directory of the project.
  -v, --version         Show the version of the migration tool.

Example One

  1. Import the ServiceNow add-on on github to Splunk add-on builder under $YOUR_FOLDER/ta_servicenow.
  2. Run the following command of the migration tool:
    ./project_migration_tool -a import -i $YOUR_FOLDER/ta_servicenow/TA-ServiceNow -s http://localhost:8000 -u admin -p changeme AOB2.2 servicenowexample.png

Example two

Export the ServiceNow add-on on your local Splunk instance to github.

  1. Run the following command:
    ./project_migration_tool -a export -t TA-ServiceNow -o /tmp/ta_servicenow/ -s http://localhost:8000 -u admin -p changeme
  2. Copy the exported content to git repo directory.
    cp -r /tmp/ta_servicenow/TA-ServiceNow/* $YOUR_FOLDER/ta_servicenow/TA-ServiceNow
  3. Check in the changes.
Last modified on 13 June, 2022
Design your add-on   Create an add-on

This documentation applies to the following versions of Splunk® Add-on Builder: 4.1.1, 4.1.2, 4.1.3


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters