Splunk Search

Adding link to SharePoint document in XML

gabarrygowin
Path Finder

Hi all,

Tried a bunch of different recommendations for adding a hyperlink to a document (site) to no avail. My wish is to add a link at the top of each Dashboard that takes the dashboard auditor to the current reference audit guide. I believe the SharePoint link (with it's crazy characters it the issue). Below is the closest I've gotten.
"Code Sample

<searchname> Audit Guide </searchname>
   <drilldown>
      <link href="https://teams.ga.com/ITS/ITDocCtr/_layouts/WordViewer.aspx?id=%2FITS%2FITDocCtr%2FDocuments%2FSI%2D6100%2D1%20Audit%20Guide%2Edocx&source=https%3A%2F%2Fteams%2Ega%2Ecom%2FITS%2FITDocCtr%2FDocuments%2FForms%2FAllItems%2Easpx%3FPaged%3DTRUE%26p%5FFileLeafRef%3DDSec%252d8133%2520Creating%2520Tickets%2520with%2520ASG%252edocx%26p%5FID%3D734%26PageFirstRow%3D601%26%26View%3D%7BA5C21B15%2D70AF%2D41D8%2D8D54%2D7695FD9C01A8%7D"</link>
    </drilldown>

"

Tags (1)
0 Karma
1 Solution

niketn
Legend

@gabarrygowin, there is an an ampersand sign in your URL which needs to be escaped as &amp; in Splunk Dashboard. Try the following method:

    <drilldown>
      <link target="_blank">https://teams.ga.com/ITS/ITDocCtr/_layouts/WordViewer.aspx?id=%2FITS%2FITDocCtr%2FDocuments%2FSI-6100-1%20Audit%20Guide%2Edocx&amp;source=https%3A%2F%2Fteams%2Ega%2Ecom%2FITS%2FITDocCtr%2FDocuments%2FForms%2FAllItems%2Easpx%3FPaged%3DTRUE%26p_FileLeafRef%3DDSec%252d8133%2520Creating%2520Tickets%2520with%2520ASG%252edocx%26p_ID%3D734%26PageFirstRow%3D601%26%26View%3D%7BA5C21B15-70AF-41D8-8D54-7695FD9C01A8%7D</link>
    </drilldown>

PS: Adding target="_balnk" will open the link in new browser.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@gabarrygowin, there is an an ampersand sign in your URL which needs to be escaped as &amp; in Splunk Dashboard. Try the following method:

    <drilldown>
      <link target="_blank">https://teams.ga.com/ITS/ITDocCtr/_layouts/WordViewer.aspx?id=%2FITS%2FITDocCtr%2FDocuments%2FSI-6100-1%20Audit%20Guide%2Edocx&amp;source=https%3A%2F%2Fteams%2Ega%2Ecom%2FITS%2FITDocCtr%2FDocuments%2FForms%2FAllItems%2Easpx%3FPaged%3DTRUE%26p_FileLeafRef%3DDSec%252d8133%2520Creating%2520Tickets%2520with%2520ASG%252edocx%26p_ID%3D734%26PageFirstRow%3D601%26%26View%3D%7BA5C21B15-70AF-41D8-8D54-7695FD9C01A8%7D</link>
    </drilldown>

PS: Adding target="_balnk" will open the link in new browser.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

gabarrygowin
Path Finder

Nike!

Thanks you got me past the URL issue. I converted to a href (hope that's correct/best way). Seems to work.

Now some clean-up, if I may.

  1. Where (if I can at all) do I put the target="_blank" in a href call?

Many thanks!

0 Karma

niketn
Legend

Try putting it between link and href

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

gabarrygowin
Path Finder

Perfect and many thanks!

Just for others, here's my code, or Nike's code:

"Code Sample...

  <html>
    <a target="_blank" href="https://teams.ga.com/ITS/ITDocCtr/_layouts/WordViewer.aspx?id=%2FITS%2FITDocCtr%2FDocuments%2FSI-6100-1%20Audit%20Guide%2Edocx&amp;source=https%3A%2F%2Fteams%2Ega%2Ecom%2FITS%2FITDocCtr%2FDocuments%2FForms%2FAllItems%2Easpx%3FPaged%3DTRUE%26p_FileLeafRef%3DDSec%252d8133%2520Creating%2520Tickets%2520with%2520ASG%252edocx%26p_ID%3D734%26PageFirstRow%3D601%26%26View%3D%7BA5C21B15-70AF-41D8-8D54-7695FD9C01A8%7D">Current ITS Audit Guide (SI-6100-1)</a>
    </html>

"

Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...