All Apps and Add-ons

How to use parameter q from the URL in the View XML

tkadale
Path Finder

Hi

I am passing a search query through url to a view. I want to use the passed query as a filter to the graphs I am showing in the view.

How can I use the q URL param in view xml?

Tags (1)

sideview
SplunkTrust
SplunkTrust

This should be asked as a separate question.
However what are you trying to do? It looks very strange. metadata type="sources" will contain only sources - there will be no host fields and if "summer2" is a hostname, and if $host$ comes from some other pulldown you haven't included, that contributes a hostname, then I'd expect the search to always return 0 results. Also you're using HiddenSearch instead of Search so, if you're using Sideview's modules that wont work at all... etc...
But lets start with the full XML, what you're trying to do, and lets move it to a different question.

David
Splunk Employee
Splunk Employee

Unfortunately, you can't do this in Splunk out of the box. Fortunately, it is possible with an app called sideview utils, available on Splunkbase. You'll need convert your views to advanced XML if they aren't already, so there is definitely more complexity, but then you'll be able to pass parameters with ease.

Sideview Utils on Splunkbase

hexx
Splunk Employee
Splunk Employee

Please provide the XML snippet showing the module definition where this feature is used.

0 Karma

ReanaKhan
Explorer

Does thi need sive ViewUtils app.

I tried to do this and i got this error

TypeError: () got an unexpected keyword argument 'q'

0 Karma

sideview
SplunkTrust
SplunkTrust

Redirector and URLLoader are the two main players, and then the Pulldown, TextField and Checkbox modules themselves prepopulate so they play a role too. Download Sideview Utils and read through the several pages of documentation in the 'general techniques > linking' section.

tkadale
Path Finder

Which modules from SideViewUtils should I use to achieve this??

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...