Splunk Dev

Link url in splunk dashboard?

karthi2809
Builder

Hi All,

In the table i have URL .So if i am clicking on the URL it will redirect existing dashboard. Now i want to show only click here .If i click then existing dashboard is to be open. Instead URL value i need click here and to open the URL



This is my table 

NameInterfaceLink 
DSR1DSR1www.google.com 
DSR2DSR2www.splunk.com 
Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Rename you field with the url in to start with an underscore e.g. "_url", then refer to it in the drilldown as suggested earlier e.g. "$row._url$"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to set up a link drilldown on this field, using the value from the click as the address to link to. Try something like this

        <drilldown>
          <condition field="Link">
            <link target="_blank">https://$click.value2|n$</link>
          </condition>
        </drilldown>
0 Karma

karthi2809
Builder

Yes i am used the below drilldown. Instead of full url in column want to use Click here name.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Do you mean something like this

        <drilldown>
          <condition field="Name">
            <link target="_blank">https://$row.url|n$</link>
          </condition>
        </drilldown>
0 Karma

karthi2809
Builder

Not like that,I have a table with 5 column and one of the column URL field. Instead of showing full URL .I need to show only click here instead of URL. Then we need to open the complete URL on clicking click here.

 

Name URLApp
DSRclick hereWeb app

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Rename you field with the url in to start with an underscore e.g. "_url", then refer to it in the drilldown as suggested earlier e.g. "$row._url$"

0 Karma

karthi2809
Builder

Hi @ITWhisperer 

How to check if the url is null in xml dashboard.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You could try something like this

        <drilldown>
          <condition field="Name">
            <eval token="link">if(isnull($row.url$),"","https://$row.url|n$"</eval>
            <link target="_blank">$link$</link>
          </condition>
        </drilldown>
0 Karma

karthi2809
Builder

Hi @ITWhisperer 

This is my code in xml dashboard. In my dashboard some link should be present. So if i click on the link it showing null. So i used below code. Still i am getting null value.

<condition field="Link">
<eval token="link">if(isnull($row.URL$),"","https://$row.URL|n$"</eval>
<link target="_blank">$row.URL|n$</link>
</condition>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Perhaps if you read my suggestion more carefully you would have noticed that I suggested you evaluate a new token and then use that token in the link!

0 Karma
Get Updates on the Splunk Community!

Best Strategies to Optimize Observability Costs

 Join us on Tuesday, May 6, 2025, at 11 AM PDT / 2 PM EDT for an insightful session on optimizing ...

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...