Dashboards & Visualizations

Dashboard design

jkeat12
New Member

I am trying to adjust the dashboard to show the query that is being generated by a list of drop downs. I think this will help the team better understand how to build queries in the future. If you have the html source that points towards this that would be greatly appreciated. 

 

Labels (2)
0 Karma

renjith_nair
SplunkTrust
SplunkTrust

Splunk dashboard app has similar features and could refer that.

https://splunkbase.splunk.com/app/1603/

Very basic dashboard could be done as below

 

<form>
  <label>Options</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="sourcetype">
      <label>Sourcetype</label>
      <choice value="*">All</choice>
      <default>*</default>
      <initialValue>*</initialValue>
      <fieldForLabel>sourcetype</fieldForLabel>
      <fieldForValue>sourcetype</fieldForValue>
      <search>
        <query>index=_*|stats count by sourcetype</query>
        <earliest>-4h@m</earliest>
        <latest>now</latest>
      </search>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <search>
          <query>index=_* sourcetype=$sourcetype$|stats count  by index,sourcetype</query>
          <earliest>-60m@m</earliest>
          <latest>now</latest>
          <done>
            <set token="search_src">$job.search$</set>
          </done>
        </search>
        <option name="charting.chart">column</option>
        <option name="charting.chart.stackMode">stacked</option>
        <option name="charting.drilldown">none</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="refresh.display">progressbar</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <html>
        <h2>Main Search</h2>
        <hr></hr>
        <p>$search_src$</p>
      </html>
    </panel>
  </row>
</form>

 

 

Happy Splunking!

jkeat12
New Member

Thank you that got me pointed in the right direction

 

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...