<?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: use token in dashboard with if statement in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565228#M46448</link>
    <description>&lt;P&gt;If the checkbox is selected then have the token value be "host=*".&amp;nbsp; If it is not selected then the token should contain the subsearch.&amp;nbsp; Then the query becomes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset" $host$ | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 30 Aug 2021 11:48:07 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-08-30T11:48:07Z</dc:date>
    <item>
      <title>use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565222#M46447</link>
      <description>&lt;P&gt;Hello&lt;BR /&gt;I have a dashboard with this search&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset" if $host$="yes" [| inputlookup windows_hosts_srv_2016.csv  | fields host | format] | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;&lt;P&gt;I want to add checkbox so the defualt search will be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset" if $host$="yes" host=* | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and if the client clicks on the checkbox then it will search by the first query&amp;nbsp;&lt;/P&gt;&lt;P&gt;how it can be done ?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 10:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565222#M46447</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-30T10:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565228#M46448</link>
      <description>&lt;P&gt;If the checkbox is selected then have the token value be "host=*".&amp;nbsp; If it is not selected then the token should contain the subsearch.&amp;nbsp; Then the query becomes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset" $host$ | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Aug 2021 11:48:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565228#M46448</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-30T11:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565232#M46449</link>
      <description>&lt;P&gt;Where should I add the conditions?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 11:52:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565232#M46449</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-30T11:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565233#M46450</link>
      <description>&lt;P&gt;In the &amp;lt;input&amp;gt; element where the token is defined.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 12:45:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565233#M46450</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-30T12:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565250#M46451</link>
      <description>&lt;P&gt;should it be something like this:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Clock sync Clone&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="field1"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&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;/default&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="checkbox" token="field2"&amp;gt;
      &amp;lt;label&amp;gt;field2&amp;lt;/label&amp;gt;
      &amp;lt;choice value="yes"&amp;gt;Check for listed hosts&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="yes"&amp;gt;
          &amp;lt;query&amp;gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset" $host$ | timechart max(Value) by host span=5m&amp;lt;/query&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;eval token="checked_result_value"&amp;gt;"B"&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;Time sync Windows servers 2016&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Time sync Windows servers 2016&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset"  [| inputlookup windows_hosts_srv_2016.csv  | fields host | format] | timechart max(Value) by host span=5m&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="height"&amp;gt;262&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Time sync Windows servers 2012&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;sourcetype=timekeeper_status [| inputlookup windows_hosts_srv_2012.csv | fields host | format] | timechart max(offsets."0") by host&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;i think im a little bit confused&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 18:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565250#M46451</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-30T18:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565255#M46452</link>
      <description>&lt;P&gt;I was thinking of something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="checkbox" token="field2"&amp;gt;
      &amp;lt;label&amp;gt;field2&amp;lt;/label&amp;gt;
      &amp;lt;choice value="yes"&amp;gt;Check for listed hosts&amp;lt;/choice&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="yes"&amp;gt;
          &amp;lt;set token="host"&amp;gt;[| inputlookup windows_hosts_srv_2012.csv | fields host | format]&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;set token="host"&amp;gt;*&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&amp;gt;
...
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Time sync Windows servers 2012&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;sourcetype=timekeeper_status $host$ | timechart max(offsets."0") by host&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;$field1.earliest$&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;$field1.latest$&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Aug 2021 19:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565255#M46452</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-30T19:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565256#M46453</link>
      <description>&lt;P&gt;i changed the query you wrote since i think there was a type&lt;BR /&gt;the query should be&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset"  $host$ | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;&lt;P&gt;but now i have 2 issues:&lt;/P&gt;&lt;P&gt;1. i have 2 panels with different csv file but i want the same checkbox to change them so i think it is impossible to put the file name in the token, no ?&lt;BR /&gt;&lt;BR /&gt;2. if the checkbox is unchecked then i get this query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype="Perfmon:Windows Time Service" counter="Computed Time Offset"  * | timechart max(Value) by host span=5m&lt;/LI-CODE&gt;&lt;P&gt;and it should be host=* and not just *&lt;BR /&gt;&lt;BR /&gt;also, the graph is now showing dots...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sarit_s_0-1630351849845.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15789i8AA659C117BC0185/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sarit_s_0-1630351849845.png" alt="sarit_s_0-1630351849845.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 19:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565256#M46453</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-30T19:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565266#M46454</link>
      <description>&lt;P&gt;1. Using 2 difference CSVs is possible, but you'll have to use 2 tokens.&amp;nbsp; Set them both in the same &amp;lt;change&amp;gt; element with two &amp;lt;set&amp;gt; elements.&lt;/P&gt;&lt;P&gt;2. My bad.&amp;nbsp; The token should be set to "host=*" if the checkbox is not selected.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 21:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565266#M46454</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-30T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565273#M46455</link>
      <description>&lt;P&gt;Where should I set the host=*? I don’t see we configured it anywhere&lt;/P&gt;&lt;P&gt;what about the dots issue? Before the changes it was lines&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 03:17:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565273#M46455</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-31T03:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565313#M46456</link>
      <description>&lt;P&gt;Instead of&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;set token="host"&amp;gt;*&amp;lt;/set&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;use&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;set token="host"&amp;gt;host=*&amp;lt;/set&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for the dots problem, have you checked the format settings for the visualization?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:44:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565313#M46456</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-31T11:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565315#M46457</link>
      <description>&lt;P&gt;its working, thanks&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 11:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565315#M46457</guid>
      <dc:creator>sarit_s</dc:creator>
      <dc:date>2021-08-31T11:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: use token in dashboard with if statement</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565329#M46458</link>
      <description>&lt;P&gt;If your problem is resolved, then please click the "Accept as Solution" button to help future readers.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/use-token-in-dashboard-with-if-statement/m-p/565329#M46458</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-08-31T13:23:47Z</dc:date>
    </item>
  </channel>
</rss>

