Dashboards & Visualizations

Is there a way to add a radio button XML input that can turn on/off auto-refresh?

Lucas_Henry_
New Member

I'd like to add a radio button input that can turn on or turn off auto-refresh. Is there a way to do this?

0 Karma

dmaislin_splunk
Splunk Employee
Splunk Employee

The 6.5 release has new support for these capabilities it is also documented in the latest 6.X dashboard examples app:

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

Notes from the app: New example "Search Refresh and Refresh Display" to leverage the new element refresh behavior support in dashboards (new feature in Splunk 6.5)

Lucas_Henry_
New Member

Okay I took a stab at it, but this doesn't appear to be working:

<form>
  <label>FileNet Errors Clone</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="time_period" searchWhenChanged="true">
      <label>Time Picker</label>
      <default>
        <earliest>-7d@h</earliest>
        <latest>now</latest>
      </default>
    </input>
    <input type="dropdown" token="ecm_env_hostname" searchWhenChanged="true">
      <label>Environment</label>
      <choice value="p">4 - Production</choice>
      <choice value="s">3 - Staging</choice>
      <choice value="q">2 - QA</choice>
      <choice value="d">1 - Development</choice>
      <default>p</default>
      <prefix>"*</prefix>
      <suffix>l5ecm*"</suffix>
      <initialValue>p</initialValue>
    </input>
    <input type="dropdown" token="refresh"> 
 <label>Refresh</label> 
 <choice value="5s">Every 5 seconds</choice> 
 <choice value="30s">Every 30 seconds</choice> 
 <choice value="0">Never</choice> 
          </input>

  </fieldset>
  <row>
    <panel>
      <html> <a href="http://www.ibm.com/support/knowledgecenter/SSNW2F_5.2.1/com.ibm.p8.ce.msgs.doc/fnrc000.htm" target="_blank">Content Platform Engine error messages</a> </html>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <title>(Environment/Index pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$  sourcetype=log4j:p8:error  | timechart count by ErrorCode</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <refresh>$refresh$</refresh>
           <refreshType>delay</refreshType> 

        </search>
        <option name="refresh.time.visible">true</option>
        <option name="refresh.link.visible">true</option>
        <option name="count">10</option>
        <option name="list.drilldown">full</option>
        <option name="list.wrap">1</option>
        <option name="maxLines">5</option>
        <option name="raw.drilldown">full</option>
        <option name="rowNumbers">0</option>
        <option name="table.drilldown">all</option>
        <option name="table.wrap">1</option>
        <option name="type">list</option>
        <fields>["host","source","sourcetype"]</fields>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">0</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">line</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.showDataLabels">none</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <single>
        <title>(Time Period/Environment/Index pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$  sourcetype=log4j:p8:error ErrorCode=* | stats count</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="drilldown">none</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="numberPrecision">0</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
        <option name="linkView">search</option>
        <option name="afterLabel">FileNet Errors</option>
        <option name="rangeColors">["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="trendInterval">auto</option>
        <option name="underLabel">time picker</option>
      </single>
    </panel>
    <panel>
      <single>
        <title>(Time Period/Environment/Index pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$ sourcetype="log4j:was:sysout" EventType="*" | stats count</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="drilldown">none</option>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="numberPrecision">0</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
        <option name="linkView">search</option>
        <option name="rangeColors">["0x65a637","0x6db7c6","0xf7bc38","0xf58f39","0xd93f3c"]</option>
        <option name="rangeValues">[0,30,70,100]</option>
        <option name="trendInterval">auto</option>
        <option name="underLabel">time picker</option>
        <option name="afterLabel">Log Errors</option>
      </single>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host="*pl5ecm*"  sourcetype=log4j:p8:error  ErrorCode=* | eventstats count AS totalCount | eventstats count as "choiceCount" by ErrorCode| eval percent=(choiceCount/totalCount)*100 | eval percent=round(percent, 2)| stats values(choiceCount) as "event count" values(percent) as "percent of total" by ErrorCode| sort - "percent of total"</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">true</option>
        <option name="drilldown">cell</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$ sourcetype="log4j:was:sysout" EventType="*" | eventstats count AS totalCount | eventstats count as "choiceCount" by EventType | eval percent=(choiceCount/totalCount)*100 |eval percent=round(percent, 2)| stats values(choiceCount) as "event count" values(percent) as "percent of total" by EventType| sort - "percent of total"</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">true</option>
        <option name="drilldown">cell</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>
      <table>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$  sourcetype=log4j:p8:error  host=*| eventstats count AS totalCount | eventstats count as "choiceCount" by host | eval percent=(choiceCount/totalCount)*100 | eval percent=round(percent, 2)| stats values(choiceCount) as "event count" values(percent) as "percent of total" by host | sort - "percent of total"</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="wrap">undefined</option>
        <option name="rowNumbers">undefined</option>
        <option name="drilldown">row</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
      </table>
    </panel>
    <panel>
      <table>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$ sourcetype="log4j:was:sysout" host="*" | eventstats count AS totalCount | eventstats count as "choiceCount" by host | eval percent=(choiceCount/totalCount)*100 | eval percent=round(percent, 2)| stats values(choiceCount) as "event count" values(percent) as "percent of total" by host | sort - "percent of total"</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="wrap">undefined</option>
        <option name="rowNumbers">undefined</option>
        <option name="drilldown">row</option>
        <option name="dataOverlayMode">none</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
  <row>
    <panel>
      <chart>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$  sourcetype=log4j:p8:error ErrorCode=* | timechart count</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="list.drilldown">full</option>
        <option name="list.wrap">1</option>
        <option name="maxLines">5</option>
        <option name="raw.drilldown">full</option>
        <option name="rowNumbers">0</option>
        <option name="table.drilldown">all</option>
        <option name="table.wrap">1</option>
        <option name="type">list</option>
        <fields>["host","source","sourcetype"]</fields>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">0</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">line</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.showDataLabels">none</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">minimal</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">none</option>
        <option name="colorBy">value</option>
        <option name="colorMode">none</option>
        <option name="numberPrecision">0</option>
        <option name="showSparkline">1</option>
        <option name="showTrendIndicator">1</option>
        <option name="trendColorInterpretation">standard</option>
        <option name="trendDisplayMode">absolute</option>
        <option name="useColors">0</option>
        <option name="useThousandSeparators">1</option>
      </chart>
    </panel>
    <panel>
      <chart>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$ sourcetype="log4j:was:sysout" EventType="*" | timechart count</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="list.drilldown">full</option>
        <option name="list.wrap">1</option>
        <option name="maxLines">5</option>
        <option name="raw.drilldown">full</option>
        <option name="rowNumbers">0</option>
        <option name="table.drilldown">all</option>
        <option name="table.wrap">1</option>
        <option name="type">list</option>
        <fields>["host","source","sourcetype"]</fields>
        <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
        <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
        <option name="charting.axisTitleX.visibility">visible</option>
        <option name="charting.axisTitleY.visibility">visible</option>
        <option name="charting.axisTitleY2.visibility">visible</option>
        <option name="charting.axisX.scale">linear</option>
        <option name="charting.axisY.scale">linear</option>
        <option name="charting.axisY2.enabled">0</option>
        <option name="charting.axisY2.scale">inherit</option>
        <option name="charting.chart">line</option>
        <option name="charting.chart.bubbleMaximumSize">50</option>
        <option name="charting.chart.bubbleMinimumSize">10</option>
        <option name="charting.chart.bubbleSizeBy">area</option>
        <option name="charting.chart.nullValueMode">gaps</option>
        <option name="charting.chart.showDataLabels">none</option>
        <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
        <option name="charting.chart.stackMode">default</option>
        <option name="charting.chart.style">shiny</option>
        <option name="charting.drilldown">all</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">none</option>
      </chart>
    </panel>
  </row>
  <row>
    <panel>
      <event>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$ sourcetype="log4j:p8:error"  ErrorCode="*"</query>
          <earliest>$time_period.earliest$</earliest>
          <latest>$time_period.latest$</latest>
        </search>
        <option name="count">10</option>
        <option name="list.drilldown">full</option>
        <option name="list.wrap">1</option>
        <option name="maxLines">5</option>
        <option name="raw.drilldown">full</option>
        <option name="rowNumbers">0</option>
        <option name="table.drilldown">all</option>
        <option name="table.wrap">1</option>
        <option name="type">list</option>
        <fields>["host","source","sourcetype"]</fields>
      </event>
    </panel>
    <panel>
      <event>
        <title>(Time Period/Environment pickers)</title>
        <search>
          <query>index=ecmaas* host=$ecm_env_hostname$  sourcetype=log4j:was:sysout EventType="*"  | timechart count</query>
          <earliest>0</earliest>
          <latest></latest>
        </search>
        <option name="count">10</option>
        <option name="list.drilldown">full</option>
        <option name="list.wrap">1</option>
        <option name="maxLines">5</option>
        <option name="raw.drilldown">full</option>
        <option name="rowNumbers">0</option>
        <option name="table.drilldown">all</option>
        <option name="table.wrap">1</option>
        <option name="type">list</option>
        <fields>[]</fields>
      </event>
    </panel>
  </row>
</form>
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...