Step 1. Create an app with a dashboard and convert it to HTML

In this step, you'll create an app, then create a dashboard with a form to collect information from the user. you'll use the Dashboard Editor in Splunk Web to quickly add the form inputs, then convert the dashboard to HTML so you can customize it to work with the App Key Value Store.

First, you'll create an app for the tutorial:

  1. On the Splunk Web home page, click the Gears icon next to Apps.
  2. Click Create app.
  3. On the Add new page, fill out the properties of the new app:
    • For Name, enter "KV Store Tutorial".
    • For Folder name, enter "kvstoretutorial".
    • Under Template, select "barebones".
  4. Click Save.
    Note  You need access to source files on your Splunk instance, so you might need to contact your Splunk administrator for permission and access.

Next, you'll create a dashboard with the fields for the customer data form, including a table to display the contents of the KV Store collection you'll be creating.

  1. On the Apps page, find the KV Store Tutorial app in the list and click Launch app. (You can also open the app from the Splunk Web home page.)
  2. On the navigation bar at the top of the page, click Dashboards.
  3. Click Create New Dashboard, then fill out the dashboard properties:
    • For Title, enter "Customer Info".
    • For Permissions, click Shared in App.
  4. Click Create Dashboard.
  5. The new Customer Info dashboard is displayed in edit mode.

  6. Add the text input fields to the form. Click + Add Input > Text to create a text input field, click the Edit Input Edit icon icon, replace the Label and Token with "CustID", then click Apply. Repeat this step for the following text fields:
    • CustName
    • CustStreet
    • CustCity
    • CustState
    • CustZip
    • KeyID
  7. Add a Submit button by clicking + Add Input > Submit.
  8. Add a table by clicking + Add Panel > New > Statistics Table:
    • For Content Title, enter "KV Store collection".
    • In Search String, enter "TBD".
  9. Click Add to Dashboard.
  10. Don't worry about the layout, you'll change it later in the HTML code.

  11. Click Save.

Your dashboard should look like this:

A simple app that uses the KV Store

Now, convert the dashboard to HTML so you can add code to it.

  1. On the dashboard, click the ellipsis ... > Convert to HTML.
  2. For Permissions, click Shared (this keeps the HTML file in the app's folder, /$SPLUNK_HOME/etc/apps/kvstoretutorial). You can leave everything else as is.
  3. Click Convert Dashboard.
  4. To see the HTML version of the dashboard, click View.
  5. The dashboard looks and works the same as the Simple XML version, except for the new title.

Continue to Step 2. Set up the configuration files for the KV Store.