Dashboards & Visualizations

How to give link to raw data for last 15 minutes to run everytime when the hyperlink is selected

vrmandadi
Builder

I am creating a dashboard which has link to all the different sourcetypes,the dashboard has the sourcetype name a description and a hyperlink which on click should open in a new tab and run in verbose mode for the last 15 mins for that particular sourcetype.Below is the way I have done but not successfull.

          <a href="https://splunk.vap.rr.com/en-US/app/myapp/search?earliest=-15m&latest=now&q=search%20index%3Dvap%20sourcetype%3Dad_it_message%20host%3D%22*ads-broker*%22&display.page.search.mode=verbose&dispatch.sample_ratio=1&display.general.type=events&display.page.search.tab=events&sid=$results.sid$" target="_blank" alt="Click here to view the Data" title="Click here to view the Data">Ad Router</a>

Thanks in Advance

0 Karma

vrmandadi
Builder

Ii figured it out

https://splunk.vap.rr.com/en-US/app/myapp/search?earliest=-15m&amp;latest=now&amp;display.page.searc...

using amp; near the & so that xml does not treat as invalid character

0 Karma

niketnilay
Legend

@vrmandadi please accept the same to mark this as answered! If you are on Splunk Enterprise 6.6 or higher, you could have created link to search interactively from Dashboard which would have escaped & character automatically. Refer to documentation: https://docs.splunk.com/Documentation/Splunk/latest/Viz/DrilldownLinkToSearch#Configure_the_drilldow...

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

nickhills
Ultra Champion

have you tried $results.row.sid$

If my comment helps, please give it a thumbs up!
0 Karma

vrmandadi
Builder

Ya I tried this but it is showing me error "Invalid character entity" ,It is accepting if I give https://splunk.vap.rr.com/en-US/app/vams/search?earliest=-15m&latest=now ,but not the whole thing

https://splunk.vap.rr.com/en-US/app/vams/search?earliest=-15m&latest=now&q=search%20index%3Dvap%20so...

0 Karma

nickhills
Ultra Champion

Do you even need to pass the sid if your running a normal search? - I first read this as you were linking to a scheduled search, but on second read, I don't think you need this.

You probably just 'need'
https://splunk.vap.rr.com/en-US/app/myapp/search?earliest=-15m&latest=now&q=search%20index%3Dvap%20s...

If my comment helps, please give it a thumbs up!
0 Karma

vrmandadi
Builder

Got the following error Error parsing XML on line 55: EntityRef: expecting ';'

0 Karma

nickhills
Ultra Champion

Sadly, I don't have access to a working splunk instance at the moment, but i would suspect there is a typo or a quoting issue in the url - run the search you want, then copy the url from your browser address bar and compare them.

If my comment helps, please give it a thumbs up!
0 Karma

vrmandadi
Builder

Can we do this CDATA ?

0 Karma