Dashboards & Visualizations

How do I set in a dashboard a link to a saved search which contains double quotes?

skender27
Contributor

Hi splunkers,

I have a dashboard in Splunk with panels in html format, like this:

<panel>
      <html>
      <body>
...
<a href=...
...

How can I set a link inside this dashboard in order to point to an existing search which contains double quotes, like this:

index=myindex sourcetype="Search_Name_(with_quotes)"

I tried this:

<a href="@go?s=index=myindex sourcetype=Search_Name_(with_quotes)"

but it not working...
It is like I have to know the escape character of the duble quotes or a the URL encoing of such character.

Any suggestions?

Thanks a lot,
Skender

0 Karma

jaxjohnny2000
Builder

Try this: note: %20 is HTML for a space

  <title>Editor Panel</title>
  <html>
    <style>.btn-primary { margin: 5px 10px 5px 0; }</style>
  <font size="4">
  <table>
      <tr>    
          <td>
            <a class="btn btn-primary" href="https://SPLUNK-SERVER-DNS.com/en-US/app/DESTINATION-APP/report?s=Report%20-%20NAME%20HERE" target="_blank">Descriptive Text here AKA Report Name Here</a>
         </td>
     </tr>
 </table>
 </font>    

</panel>
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi skender27,
did you tried with backslash (\) before doublequotes?
Evert way I suggest to avoid spaces in knowledge object.
Bye.
Giuseppe

skender27
Contributor

Hi Giuseppe,

You mean like this:

<a href="@go?s=index=myindex sourcetype=\"Search_Name_(with_quotes)\""

Skender

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi skender27,
Yes, it should run...

Bye.
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...