Dashboards & Visualizations

URL decode query string variables in HTML dashboard

nabeel652
Builder

Hi
I have a html dashboard that gets some of the parameters from the query string:

https://my.splunkcloud.com/en-GB/app/appperfmon/machine_profile_user?form.cname%3DWS1642%26form.bt%3...

the dashboard halts on "waiting for input" as it cannot read the url encoded variables. It works if the variables are not url encoded but that gives other problems.

Any ideas how I can url decode my variables in javascript before feeding them to splunk searches in my dashboard.

0 Karma

woodcock
Esteemed Legend

First of all, you are probably trying to do too much yourself. Check out the Splunk Dashboards Examples app and see the different ways and nuances for each one:

https://splunkbase.splunk.com/app/1603/
Short of that, you can do it in Splunk with this (might need some adjusting):

... | rex field=foo mode=sed "s:%25:%:g s:%20: :g s:%3C:<:g s:%3E:>:g s:%23:#:g s:%7B:{:g s:%7D:}:g s:%7C:\|:g s:%5C:\\\:g s:%5E:\^:g s:%7E:~:g s:%5B:\[:g s:%5D:\]:g s:%60:\`:g s:%3B:;:g s:%2F:/:g s:%3F:\?:g s/%3A/:/g s:%40:@:g s:%3D:=:g s:%26:&:g s:%24:\$:g s:%21:\!:g s:%2A:\*:g s:%22:\":g s:%28:\(:g s:%29:\):g s:%2B:\+:g"
0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...