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
Ii figured it out
using amp; near the & so that xml does not treat as invalid character
@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...
have you tried $results.row.sid$
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
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...
Got the following error Error parsing XML on line 55: EntityRef: expecting ';'
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.
Can we do this CDATA ?