SPLK-2001 Exam QuestionsBrowse all questions from this exam

SPLK-2001 Exam - Question 53


Given a dashboard with a Simple XML extension in myApp, what is the XML reference for the file myJS.js located in myOtherApp in the location shown below?

$SPLUNK_HOME/etc/apps/myOtherApp/appserver/static/javascript/

Show Answer
Correct Answer: C

In Splunk, when referencing a file from a different app's appserver static directory in a Simple XML dashboard, you need to specify the app's name and the subdirectory structure. The correct format is to use 'appname:subdirectory/filename'. Given the file is located under $SPLUNK_HOME/etc/apps/myOtherApp/appserver/static/javascript/, the appropriate reference would be myOtherApp:javascript/myJS.js.

Discussion

1 comment
Sign in to comment
New_userOption: B
Jul 18, 2021

Answer is B. You should specify other app's name if script is located there

New_user
Jul 18, 2021

Sorry, answer is C. Script must be located in the "appserver/static" folder of the app. Since "javascript" is a subfolder, we must specify it's name : script="otherApp:javascript/myScript.js" Look example here, under "Attributes" header: https://docs.splunk.com/Documentation/Splunk/latest/Viz/PanelreferenceforSimplifiedXML

guilhermecervo
Nov 16, 2022

Agree. Answer is C.

qtygbapjpesdayazko
Sep 17, 2023

C. <dashboard script="myOtherApp:javascript/myJS.js"> Same app "/etc/apps/my_app/appserver/static/my_code.js" <dashboard script="my_code.js"> Other app "/etc/apps/myOtherApp/appserver/static/my_code.js" <dashboard script="myOtherApp:javascript/myJS.js">