<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a checkbox For Auto Refresh in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/540139#M37018</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an Excellent approach that is working fine.&lt;/P&gt;&lt;P&gt;The only issue I am facing is after 5 minutes when its stopping its going back to panel without Auto refresh.&lt;/P&gt;&lt;P&gt;Cant it be stopped at that moment after 5 minutes when&amp;nbsp; and checkbox can be unchecked.&lt;/P&gt;&lt;P&gt;Because after 5 minutes its going back to panel with out Auto Refresh which consists of old logs&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Feb 2021 16:41:00 GMT</pubDate>
    <dc:creator>aditsss</dc:creator>
    <dc:date>2021-02-16T16:41:00Z</dc:date>
    <item>
      <title>How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539733#M36968</link>
      <description>&lt;P&gt;Hi&amp;nbsp; Everyone,&lt;/P&gt;&lt;P&gt;I have one requirement.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As of now I have put Auto Refresh for my panel.&lt;/P&gt;&lt;P&gt;My requirement is I want to create a checkbox for Auto Refresh which when&amp;nbsp; checked will start Auto Refresh for every 5 sec and will close in 5 minutes automatically.&lt;/P&gt;&lt;P&gt;By Default the check box should ne unchecked.&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;&amp;lt;form theme="dark"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt; Process Dashboard Auto Refresh&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldset submitButton="true" autoRun="true"&amp;gt;&lt;BR /&gt;&amp;lt;input type="time" token="field1" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Date/Time&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&amp;lt;input type="text" token="process_tok1"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Processor Id&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&amp;lt;input type="text" token="ckey" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Parent Chain&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;prefix&amp;gt;parent_chain="*&amp;lt;/prefix&amp;gt;&lt;BR /&gt;&amp;lt;suffix&amp;gt;*"&amp;lt;/suffix&amp;gt;&lt;BR /&gt;&amp;lt;initialValue&amp;gt;&amp;lt;/initialValue&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&amp;lt;input type="text" token="usr"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;User&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;input type="checkbox" token="auto"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;Auto Refresh&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;BR /&gt;&amp;lt;/fieldset&amp;gt;&lt;BR /&gt;&amp;lt;row&amp;gt;&lt;BR /&gt;&amp;lt;panel&amp;gt;&lt;BR /&gt;&amp;lt;table&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;index=abc&amp;nbsp; sourcetype=xyz&amp;nbsp; source="user.log" $process_tok1$&lt;BR /&gt;| rex field=_raw "(?&amp;amp;lt;id&amp;amp;gt;[A_Za-z0-9]{8}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{4}[\-][A_Za-z0-9]{12})"&lt;BR /&gt;| join type=outer id [inputlookup parent_chains_e1.csv]|search $ckey$|search $usr$|eval ClickHere=url|rex field=url mode=sed "s/\\/\\//\\//g s/https:/https:\\//g"&lt;BR /&gt;| table _time _raw host id parent_chain url&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;&lt;BR /&gt;&amp;lt;refresh&amp;gt;5s&amp;lt;/refresh&amp;gt;&lt;BR /&gt;&amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;option name="count"&amp;gt;100&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="drilldown"&amp;gt;cell&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;&lt;BR /&gt;&amp;lt;drilldown&amp;gt;&lt;BR /&gt;&amp;lt;condition field="url"&amp;gt;&lt;BR /&gt;&amp;lt;link target="_blank"&amp;gt;$row.url|n$&amp;lt;/link&amp;gt;&lt;BR /&gt;&amp;lt;/condition&amp;gt;&lt;BR /&gt;&amp;lt;/drilldown&amp;gt;&lt;BR /&gt;&amp;lt;/table&amp;gt;&lt;BR /&gt;&amp;lt;/panel&amp;gt;&lt;BR /&gt;&amp;lt;/row&amp;gt;&lt;BR /&gt;&amp;lt;/form&amp;gt;&lt;/P&gt;&lt;P&gt;Can someone guide me how to achieve&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539733#M36968</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-02-12T17:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539813#M36982</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225066"&gt;@aditsss&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Check if the below code works for you. The below dashboard contains two rows with the same panel with the same queries. One row depends on token&amp;nbsp;$&lt;STRONG&gt;autorefresh_row&lt;/STRONG&gt;$ and its panels refresh every 5 seconds and another row depends on token $&lt;STRONG&gt;static_row&lt;/STRONG&gt;$ and there is no refresh.&lt;BR /&gt;&lt;BR /&gt;Token &lt;STRONG&gt;autorefresh_row&lt;/STRONG&gt; is set when the checkbox is checked and token &lt;STRONG&gt;static_row&lt;/STRONG&gt; is set when the checkbox is unchecked.&lt;BR /&gt;&lt;BR /&gt;And it is a difficult task to implement to close the dashboard after 5 minutes when autorefresh is checked. So instead of closing the dashboard, you can unset&amp;nbsp;&lt;STRONG&gt;autorefresh_row&amp;nbsp; token&amp;nbsp;&lt;/STRONG&gt;and set&amp;nbsp;&lt;STRONG&gt;static_row token &lt;/STRONG&gt;after 5 mins. This will display the panel with no autorefresh.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Test&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;
    &amp;lt;input type="checkbox" token="autorefresh" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;choice value="autorefresh"&amp;gt;Enable Auto Refresh&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="autorefresh"&amp;gt;
          &amp;lt;set token="autorefresh_row"&amp;gt;1&amp;lt;/set&amp;gt;
          &amp;lt;unset token="static_row"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;eval token="start_time"&amp;gt;now()&amp;lt;/eval&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;unset token="autorefresh_row"&amp;gt;&amp;lt;/unset&amp;gt;
          &amp;lt;set token="static_row"&amp;gt;1&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row depends="$autorefresh_row$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel - with auto refresh&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal | stats count by sourcetype, source&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;refresh&amp;gt;5s&amp;lt;/refresh&amp;gt;
          &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;condition match="relative_time(now(), &amp;amp;quot;-5m&amp;amp;quot;) &amp;amp;gt;= $start_time$"&amp;gt;
              &amp;lt;set token="static_row"&amp;gt;1&amp;lt;/set&amp;gt;
              &amp;lt;unset token="autorefresh_row"&amp;gt;&amp;lt;/unset&amp;gt;
              &amp;lt;unset token="form.autorefresh"&amp;gt;&amp;lt;/unset&amp;gt;
            &amp;lt;/condition&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;preview&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row depends="$static_row$"&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel - without auto refresh&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal | stats count by sourcetype, source&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 18:48:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539813#M36982</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-13T18:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539815#M36984</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have only single query .&lt;/P&gt;&lt;P&gt;How can I set and unset two tokens.&lt;/P&gt;&lt;P&gt;Can you guide me which token I need to set and unset as per requirement.&lt;/P&gt;&lt;P&gt;As I can't set two row depends token as I have only one raw&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 19:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539815#M36984</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-02-13T19:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539837#M36991</link>
      <description>&lt;P&gt;Yes, you have only one row. You make a copy of it so there will be two rows but only one will be displayed in the dashboard. The row is visible based on its token is set or not.&lt;BR /&gt;&lt;BR /&gt;Did you try the above XML and see if it is working?&lt;/P&gt;</description>
      <pubDate>Sun, 14 Feb 2021 14:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/539837#M36991</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-14T14:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/540139#M37018</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is an Excellent approach that is working fine.&lt;/P&gt;&lt;P&gt;The only issue I am facing is after 5 minutes when its stopping its going back to panel without Auto refresh.&lt;/P&gt;&lt;P&gt;Cant it be stopped at that moment after 5 minutes when&amp;nbsp; and checkbox can be unchecked.&lt;/P&gt;&lt;P&gt;Because after 5 minutes its going back to panel with out Auto Refresh which consists of old logs&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 16:41:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/540139#M37018</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-02-16T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/540471#M37046</link>
      <description>&lt;P&gt;I have simplified it, check if this works.&lt;/P&gt;&lt;PRE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;AutoRefresh Dashboard&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;
    &amp;lt;input type="checkbox" token="autorefresh" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;choice value="autorefresh"&amp;gt;Enable Auto Refresh&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="autorefresh"&amp;gt;
          &amp;lt;set token="refresh_after"&amp;gt;5s&amp;lt;/set&amp;gt;
          &amp;lt;eval token="start_time"&amp;gt;now()&amp;lt;/eval&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Panel - with auto refresh&amp;lt;/title&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal | stats count by sourcetype, source&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-15m&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;refresh&amp;gt;$refresh_after$&amp;lt;/refresh&amp;gt;
          &amp;lt;refreshType&amp;gt;delay&amp;lt;/refreshType&amp;gt;
          &amp;lt;done&amp;gt;
            &amp;lt;condition match="relative_time(now(), &amp;amp;quot;-5m&amp;amp;quot;) &amp;amp;gt;= $start_time$"&amp;gt;
              &amp;lt;set token="refresh_after"&amp;gt;none&amp;lt;/set&amp;gt;
              &amp;lt;unset token="form.autorefresh"&amp;gt;&amp;lt;/unset&amp;gt;
            &amp;lt;/condition&amp;gt;
          &amp;lt;/done&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;preview&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 05:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/540471#M37046</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-19T05:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/541790#M37145</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 14:57:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/541790#M37145</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-01T14:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a checkbox For Auto Refresh</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/639537#M52296</link>
      <description>&lt;P&gt;I believe&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;match="relative_time(now(), &amp;amp;quot;-5m&amp;amp;quot;) &amp;amp;gt;= $start_time$" should be&lt;/PRE&gt;&lt;PRE&gt;match="relative_time(now(), &amp;amp;quot;-5s&amp;amp;quot;) &amp;amp;gt;= $start_time$"&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Apr 2023 18:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-create-a-checkbox-For-Auto-Refresh/m-p/639537#M52296</guid>
      <dc:creator>computermathguy</dc:creator>
      <dc:date>2023-04-11T18:29:12Z</dc:date>
    </item>
  </channel>
</rss>

