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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...