So you’ve created a custom Splunk app and added in plenty of relevant knowledge objects your users want. Now, to organize this mess of information what you need to do is build a custom navigation for your app so users can easily navigate to all of your objects (dashboards, reports, saved searches and other views, etc.).
Basically, what this means is that you can specify a “default view” (the first view users see upon launching your app) and re-arrange your objects in the navigation bar in Splunk Web into an sequence and “style” that makes stands out and “rocks there world.
All Splunk navigation menus are XML files and are stored as default.xml in your app’s “nav” directory.
If you created your app using Splunk Web, default.xml exists at this location:
$SPLUNK_HOME/etc/apps/<app_name>/default/data/ui/nav/default.xml
You can easily edit this file directly with an XML editor (of your choice) or, (recommended) you can use Splunk Web.
Let’s see an example
If we take our simple sample Splunk app which built using Splunk Web, we can launch the app (click on Apps and then select the app name) and then you can click on Settings and then User Interface:
From the User Interface page you select Navigation Menu:
Click on default (this will open the XML editor):
Now you can edit the XML to rearrange your apps menu. I’ve changed my default menu to simply say “Master” and make it a drop-down selection list starting with “dashboards”:
When you finish with your updates, you can click Save. (No Splunk restarts are required) and if you go back to the Splunk home page, select the app again, you will see the changes:
Awesome!
A note
If you don’t use Splunk Web to create your app (again, its recommended) you can still manually create the default.xml file, place it into your apps “nav” folder and edit that file (outside of Splunk) and make any of the navigation changes you desire.
If you read the product documentation, you’ll see the possibilities are just endless – only limited by your creativity.
See you soon.