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>

"

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...