Dashboards & Visualizations

How to add hyperlink to column value in Splunk dashboard?

d867748
Engager

Hi,
Can someone please advise how to add a hyperlink to the column fields in a table?

E.g.
How can I make NewField value a hyperlink to Field1 values (e.g. ID01 and ID02 ) in the table below instead of separate field?

Table:
Field1 NewField
ID01 http://company.test.com/page-ID01
ID02 http://company.test.com/page-ID02`

<panel>
      <title>Report Title</title>
      <table>
        <search>
          <query>index=xxx
          | fields Field1, Field2, ...
          | eval NewField = "hyperlinkhttp://company.test.com/page-".Field1
          | table Field1, NewField]   
           <earliest>$datefield.earliest$</earliest>
          <latest>$datefield.latest$</latest>
          <sampleRatio>1</sampleRatio>
        </search>
      </table>
    </panel>
</row>`

d867748
Engager

Many thanks @martin_mueller and @niketnilay for your responses, will try out the suggestions.

0 Karma

niketn
Legend

@d867748, Another alternative would be to use SimpleXML table configuration <fields> to hide NewField from the table (list only the fields that should be displayed) and still use the same for drilldown using $row.NewField$. You should check out Splunk Dashboard Examples app from Splunkbase for various drilldown examples including this one.

  <row>
     <panel>
       <title>Report Title</title>
       <table>
         <search>
           <query>| makeresults
           | eval Field1="ID01"
           | eval NewField = "http://www.company.test.com/page-".Field1
           | table Field1, NewField</query>
            <earliest>-1s</earliest>
           <latest>now</latest>
           <sampleRatio>1</sampleRatio>
         </search>
         <fields>["Field1"]</fields>
         <drilldown>
           <link target="_blank">$row.NewField|n$</link>
         </drilldown>
       </table>
     </panel>
  </row>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Store your URL in a field starting with an underscore, e.g. _url, use a drilldown on column Field1 and <link> to $row._url$.

See https://docs.splunk.com/Documentation/Splunk/7.2.6/Viz/PanelreferenceforSimplifiedXML#drilldown for docs on drilldowns, conditional drilldowns working only on specific columns are right below that.

Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...