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

niketnilay
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

niketnilay
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

niketnilay
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>

"

*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>