All Apps and Add-ons

How do I make a clickable hyperlink in search result?

peterlandis
Explorer

If the event has a URL and you want to show the URL in a search table where you can make the URL a clickable link that will go to that URL, how do you do this?

Example: Field is URL in the event and you want to display that URL in a table search aka index = ... | table URL

I want to be able to click on that URL and go to the link as to having to copy the URL and manually paste it into a browser.

Labels (1)

vinceisvince
Observer

Is there a way to do this in the generic search results?  AKA not via a dashboard?  

No matter what I put in the field value it only lets me click it say "include/exclude in search results" and I'm thinking there's no way to override this.

 

<link> - No

<a href="> No

http://whatever No

 

vinceisvince_0-1667227605046.png

 

0 Karma

woodcock
Esteemed Legend

There is an example that demonstrates this in the Dashboard Examples App on Splunkbase:

https://splunkbase.splunk.com/app/1603/
0 Karma

renjith_nair
Legend

Hi @peterlandis,

Try this example. You need to prevent the URL escaping by adding a |n ie. <link target="_blank">$row.URL|n$</link> to the token to avoid Splunk adding its own prefix.

<dashboard>
  <label>TokenTest</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults |eval URL="https://answers.splunk.com/index.html"</query>
          <earliest>-5s@s</earliest>
          <latest>now</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">cell</option>
        <drilldown>
          <link target="_blank">$row.URL|n$</link>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>
---
What goes around comes around. If it helps, hit it with Karma 🙂

CarsonZa
Contributor

try taking a look at this, it should get you going
http://docs.splunk.com/Documentation/Splunk/7.1.1/Viz/DrilldownLinkToURL

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...