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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...