Dashboards & Visualizations

link does not work if the token click.value2 contains a URL

burgi500
New Member

Hi

I try to make field which contains a plain URL (https://www.example.com/?parmaters) clickable. Therefore I use the drilldown feature with

        <condition field="session_url">
          <link>
             $click.value2$
          </link>
      </condition>
    </drilldown>

If I click on the field I get an error message. Does someone know a solution for this?

Regards,
Egon

Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

You would need to use external java script to achieve the same. Have a look at following link

https://answers.splunk.com/answers/85517/drill-down-to-absolute-url-using-click-value.html

OR see the example "Drilldown URL Field Value" in the Splunk 6.x Dashboard example app (https://splunkbase.splunk.com/app/1603/)

View solution in original post

0 Karma

michtek
Explorer

For me it works once I concatenate the static part of the URL with the parameters as in the example below. In your case you would need to extract the "sessionid" field.

<drilldown target="_blank">
   <condition field="session_url">
     <link>http://www.example.com?sessionid=$row.sessionid$</link>
   </condition>
 </drilldown>
0 Karma

burgi500
New Member

Hi michtek

I know concatenate works. But if you the variable contains the whole URL, splunk prepends:
http://yoursplunkserver:8080/de-DE/app/search/

This is the problem I am facing

Regards,
Egon

0 Karma

somesoni2
Revered Legend

You would need to use external java script to achieve the same. Have a look at following link

https://answers.splunk.com/answers/85517/drill-down-to-absolute-url-using-click-value.html

OR see the example "Drilldown URL Field Value" in the Splunk 6.x Dashboard example app (https://splunkbase.splunk.com/app/1603/)

0 Karma

sundareshr
Legend

Try using CDATA to encode the URL. Like this `'

Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...