Developing for Splunk Enterprise

Splunk APPS using Java/JavaScript SDK

Communicator

I am working on the Splunk APP for the first time. So would like to know if I can create a Customized UI where I can I have a dropdown (which is dynamically populated from my search query). And when one of the items from dropdown is clicked, some other search events run.

I got links on how to use search query using Java SDK. Can anyone point me to the location from where I can use Java SDK to create an APP having dropdown and other related search, dashboard and report information.

0 Karma

Ultra Champion

If you just want to have a dynamically populated dropdown , then you can easly do this in Simple XML or Advanced XML

0 Karma

Ultra Champion

The Javascript SDK has UI components for the Splunk charting and timeline controls.Furthermore you can also use 3rd party UI component librarys like Google charts and Rickshaw if you like.

Clone the repository from github and browse the examples.

0 Karma

Communicator

I think Option 2 is more suitable for our application as I need process the search result after the populated dropdown info. Thanks for that.

One more thing I would like to confirm is, does the Java/Javascript also provide dashboard or visualization development APIs. I would like to use the search query result to be shown in a dashboard for memory and cpu variations.

0 Karma

Ultra Champion

I am saying that you have 2 options and if you only want a populated dropdown, option 1 is going to be simpler and quicker to build.

Option 1 : Create an Advanced XML form via Splunk Web.

Option 2 : Roll your own UI using an SDK (Java/Javascript/Python)

You'll find lots of SDK examples here and also on github : http://dev.splunk.com/view/sdks/SP-CAAADP7
https://github.com/splunk/splunk-sdk-java
https://github.com/splunk/splunk-sdk-javascript

All you really need to do is execute a search, process the search result set (in XML, CSV or JSON), and fill your dropdown component.

0 Karma

Communicator

Exactly this is what i have been looking for. But not finding any suitable examples done earlier.

Are you also trying to say that I can use a combination of Java/Javascript SDK and Advance XML for performing the same operation to develop the custom UI.
I am not sure about the integration between XML and Java/Javascript SDK.

0 Karma

Ultra Champion

Yes of course you can.
Using the Java or Javascript SDK's you would execute a Splunk search and use the results of that search to dynamically populate your UI dropdown component ie: a JComboBox in Java, some JQuery code to populate a Select in Javascript etc..
You would have to code this functionality in your custom UI yourself.

0 Karma

Communicator

But is it possible to create dynamically populated dropdown from Java/Javascript SDK. I am looking for a customized UI APP, where there will be 2-3 dropdown list and upon selecting items from this dropdown list, a search query will run based on the selected items from the dropdown list.

I feel this can be done well using Java/Javascript SDK. Am I correct?

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!