Dashboards & Visualizations

dashboard with two searches each for two panels

0range
Communicator

Hello!
I got a question: everywhere in docs it is supposed that I want to make a whole dashboard run from a single search, but if I want to separate a dashboard into, for example, two hidden searches - what should I use?

0 Karma

somesoni2
Revered Legend

You can try this workaround (not tested)

<form>
 <label>Two Template Search</label>
 <description/>
 <fieldset submitButton="false" autoRun="true">
 <input type="text" token="varFirstSearch" id="field1" searchWhenChanged="true">
  <default>Your First Search Tempate query</default>
 </input>
 <input type="text" token="varSecondSearch" id="field2" searchWhenChanged="true">
 <default>Your Second Search TEmplate query</default>
 </input>
 <html id="field3">
 <body>
 <html>
 <style>.input#field1,.input#field2 { display:none; }</style>
 </html>
 </fieldset>
 <row>
 <table id="master">
  <title>First Search-Table</title>
  <searchString>$varFirstSearch$</searchString>
 </table>
 <chart>
  <title>First Search-Chart</title>
  <searchString>
$varFirstSearch$    
  </searchString>
  <earliestTime>-1w</earliestTime>
  <latestTime>-1d</latestTime>
  <option name="height">200px</option>
  <option name="charting.chart">line</option>
</chart>
<chart>
  <title>Second Search-Chart</title>
  <searchString>
    $varSecondSearch$
  </searchString>
  <earliestTime>-1w</earliestTime>
  <latestTime>-1d</latestTime>
  <option name="height">200px</option>
  <option name="charting.chart">line</option>
</chart>
</row>
</form>
0 Karma

somesoni2
Revered Legend

Nothing that I am aware of in simple xml.

0 Karma

0range
Communicator

Did not try, but it's a workaround. Good, but isn't there any default features?

0 Karma

0range
Communicator

Simple is better.
I have a question about putting search template into the chart - it the same to make just a search ? How does it work?

0 Karma

somesoni2
Revered Legend

Simple Xml or advanced xml? You may wanna look at following post:
http://answers.splunk.com/answers/67358/calling-multiple-search-templates-in-a-form

Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...