Dashboards & Visualizations

Pass in a param to a splunk advanced xml report embedded with iFrame

noambz
Explorer

Hi,

I have a splunk advanced xml report embedded in my site as an iFrame.
I want to pass in a param via they url of the iFrame,
such that inside the report I can do a hiddensavedsearch:

index=$param$ ....

I will also be happy to hear of other ideas on how to pass in the param.
In case some python/javacsript programming is necessary, I can do that.
Does anyone have a lead on how to do this?

sideview
SplunkTrust
SplunkTrust

You can use Sideview Utils in the view you're embedding. Sideview Utils contains it's own docs and how you pass in params and use them to run searches and/or prepopulate UI elements is very simple. Download the app http://sideviewapps.com/apps/sideview-utils, read the first few pages of docs, and then you can skip to the "linking" section.

In the end your URL would simply be ?index=foo

and you would refer to the index in the target view's searches as simply $index$. And if there were a TextField or Pulldown etc on the target page, whose "name" param was "index", it would prepopulate to that value.

0 Karma

sideview
SplunkTrust
SplunkTrust

I don't think so. You can create a more complicated use case, where you set a token int he URL, and you also put a text field or a pulldown module in that target view, designed to "catch" that value and prepopulate itself accordingly. However I do not think that you can simply set a token to be used as a dynamic argument to simple searches, without having any middle-step where there's a prepopulated form element. If you can have the element, and if you can use the Simple XML to make the view, this could work. If you need the advanced XML, Sideview Utils will be much easier.

0 Karma

noambz
Explorer

Thanks for the quick answer.
Is there a way to do this without Sideview Utils?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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