Dashboards & Visualizations

Using search results in html panel - partial working (v7.3.1)

apietersen
Contributor

Hi,
Want to embed a html page (html-file) as an iframe in a panel of a dashboard. Can not make it working, we use version 7.3.1 What do I wrong here?

Searched almost all docs and answer by no succes yet

apietersen

<dashboard>
  <label>variable-transfer</label>
  <init>
    <set token="err_page">https://mysplunkserver.nl/en-GB/static/</set>
  </init>
  <row>
    <panel>
      <title>Show the name of a valid helpfile</title>
      <table>
        <search>
          <query>| makeresults 
| eval msgcode="msgcode-46.html"
| fields msgcode
| return $msgcode</query>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
    <panel>
      <title>create a valid url string including <helpfile>.html directing to static directory</title>
      <html> 
          <div> 
          $err_page$  "Note: first part is OK but second part (filename) is NOT" $msgcode$

          </div>  
      </html>
    </panel>
  </row>
</dashboard>
Tags (2)
0 Karma

apietersen
Contributor

I think I found the solution: adding a set token directly after query

<dashboard>
  <label>variable-transfer</label>
  <init>
    <set token="err_page">https://mysplunkserver.nl/en-GB/static/</set>
  </init>
  <row>
    <panel>
      <title>Show the name of a valid helpfile</title>
      <table>
        <search>
          <query>| makeresults 
| eval msgcode="msgcode-46.html"
| table msgcode

</query>
    <done>
       <set token="file">$result.msgcode$</set>
     </done>
          <earliest>$earliest$</earliest>
          <latest>$latest$</latest>
        </search>

        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
    </row>
    <row>
    <panel>
      <title>create a valid url string including helpfile</title>
      <html> 
          <div> $err_page$$file$
          <iframe src="$err_page$$file$" width="100%" />

          </div>  
      </html>
    </panel>
  </row>
</dashboard>
0 Karma
Get Updates on the Splunk Community!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...