All Apps and Add-ons

Splunk App Customization.

senthamilselvan
Engager

Hi Team,

I have installed Splunk locally and customizing search and reporting app for client POC.
Normally, the dashboard icon will display all the dashboard created in particular app. Our requirement is to create 2 dashboard(example dashboard & dashboardNew) icon in the app. So that i can show few dashboards in dashboard and other dashboards in dashboardNew.

I have modified views and navigation panels and now i can able to see 2 icons(Dashbaord and DashbaordNew). Please find the below screen shot. But when i click on DashboardNew, am not able to get the dashboard homepage.I am getting below error message
DashboardNew:59 GET http://localhost:8000/en-US/static/@99CB7A89718D471BDF9A78A863F784EB0AFC1F73D21A49FA0BA538C15D4E9510... . I hope my icon is not able to read the js file and i have placed the js file also. Am not sure what i have missed on this task.

alt text

Tags (1)
0 Karma

niketn
Legend

@senthamilselvanj, I think you are over-complicating a use case which is built in to Splunk using Splunk Settings > User Interface > Navigation > Default > default.xml, which is the Navigation XML used by Splunk App.

Get rid of default dashboard xml and you can add new Navigationcollections called Dashboards and Dashboardnew. Then you can classify the links to the dashboards you need under specific collection

Following Splunk Dev site has the documentation for the same: http://dev.splunk.com/view/webframework-developapps/SP-CAAAEP9

You can in-fact put all required Dashboard under the Dashboards collection and use unclassified for the remaining dashboards to be automatically visible under Dashboardnew

<!-- Dynamically list all unclassified dashboards -->
<collection label="Dashboardnew">
    <view source="unclassified" />
</collection>

Please try out and confirm.


[UPDATED]

Based on further information. You need two menu Prod and Non Prod with 5 dashboard each under it. Following is how the default.xml should look like.

<nav search_view="search" color="#6666FF">
  <collection label="Dashboards (Non-Prod)">
    <view name="your_np_dashboard_label_1" />
    <view name="your_np_dashboard_label_2" />
    <view name="your_np_dashboard_label_3" />
    <view name="your_np_dashboard_label_4" />
    <view name="your_np_dashboard_label_5" />
  </collection>
  <collection label="Dashboards (Production)">
    <view name="your_prod_dashboard_label_1"  default="true" />
    <view name="your_prod_dashboard_label_2" />
    <view name="your_prod_dashboard_label_3" />
    <view name="your_prod_dashboard_label_4" />
    <view name="your_prod_dashboard_label_5" />
  </collection>
</nav>

PS: I have give a different color to Navigation Menu to identify that default.xml is getting applied. You can retain or change as per your need. You can change default="true" as per your requirement. There can be only one default dashboard per Splunk App.

Please try out and confirm.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

senthamilselvan
Engager

Hi niketnilay,

Thank you for input, But i am still facing the issue.
I have created 2 menu (Dashboards-NP & Dashboards-Prod) in the app. Now i have 3 dashboard menus(Dashboards,Dashboards-NP & Dashboards-Prod)

I have totally 10 dashboards which is created and shown under "Dashboards" menu. Now i want to few dashboards to display in other menus (Dashboards-NP & Dashboards-Prod). Please help me on this.
Also when i clicked on menu (Dashboards-NP orDashboards-Prod), it shows only loading.

Thanks & Regards
Selvan J

0 Karma

niketn
Legend

Can you share your current navigation XML (default.xml)?

Also if the dashboard opens and shows Loading it means Dashboard has opened, but might have some errors (usually because of JavaScript/CSS/HTML changes to Simple XML or HTML dashboards).

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@senthamilselvanj, I have updated my answer with a sample code for default.xml. Can you try t out?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

senthamilselvan
Engager

Hi niketnilay,
I tried it but still it is not working, Please find the below current navigation XML(default.xml) in the path C:\Splunk\etc\apps\search\default\data\ui\nav

   <view name="nmon" />
   <view name="NMON Alerts" />


   <view name="OPM Dashboard"  default="true" />
   <view name="Tabbed View" />
0 Karma

niketn
Legend

You are picking up Dashboard names from inside the dashboard. Pick dashboard names from $SPLUNK_HOME\apps\search\default\data\ui\views

Dashboard names are lower case and are not supposed to have spaces (they have underscore instead). If you do not have any views inside a collection correctly mapped you will not see the collection itself.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

niketn
Legend

@senthamilselvanj, is your issue resolved? Were you able to go through the Splunk Dev site to build your own Splunk Navigation?

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...