All Apps and Add-ons

Splunk Add-on Builder: how do you attach a dashboard with an add-on?

Path Finder


I created an add-on using Add-on Builder where, on the User Interface, I have these links:
Inputs | Configuration | Search |Dashboard

I have added the link Dashboard from Settings » User interface » Navigation menus » default
and added the below bold line

< nav search_view="search" color="#65A637" >
< view name="inputs" default="true" / >
< view name="configuration"/ >
< view name="search" label="Search" / >
< a href="http://:8000/en-US/app/search/dashboarddemo" >Dashboard
< / nav >

But the problem is when i save the plugin and install in another system, the dashboard is not found. I have to manually create the dashboard and change the IP in the above href and then it works.

Is there any way that, while downloading the plugin, the dashboard also gets packaged with the plugin? That way, I do not have to manually create it in a new system where I install the AddOn.

I want to share this plugin but nobody should manually create the dashboard and paste the link in the above < nav />

0 Karma



Is dashboarddemo in your addon builder generated app?

If Yes then add

 <view name="dashboarddemo" />

in navigation configuration.

0 Karma

Path Finder

No the dashboarddemo is not in the addon builder generated app.
I created the dashboard from the search app ("Create dashboard"), then i created a AddOn using addonbuilder.
then from the setting menu i added the link to the dashboard which i had already created.
Now when I am downloading the "addonexample.spl" file and installing in another machine with splunk there i am getting the Addon with the "Dashboard" on the navigation bar but on clicking the dashboard called "dashboarddemo" is missing.
If i go and create the dashboard (called "dashboarddemo") manually then the nav link from Addon works and opens up the dashboard.

0 Karma



Your app should have your dashboard files and navigation file,

Just follow these steps:
1) Create folder if not exists SPLUNK_HOME/etc//apps/default/data/ui/views/
Reference for folder Structure:
2) Copy dashboarddemo.xml file:
From: SPLUNK_HOME/etc/search/apps/local/data/ui/views/
To : SPLUNK_HOME/etc//apps/default/data/ui/views/
3) Create folder if not exists: SPLUNK_HOME/etc//apps/default/data/ui/nav/
Create a default.xml file and paste navigation XML.

4) Generate build

0 Karma
Get Updates on the Splunk Community!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...