<?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 Using a token to dynamically set the window parameter in streamstats in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660024#M54332</link>
    <description>&lt;P&gt;I can't seem to be able to set a variable or a token to the window parameter in the streamstats command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats avg(count) as avg_count window=$window_token$&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eval c = 2
| streamstats avg(count) as avg_count window=c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error saying the option value is not an integer. Seems it doesn't take the value of the variable/token. Is there any way to change the parameter dynamically?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Invalid option value. Expecting a 'non-negative integer' for option 'window'. Instead got 'c'."&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Oct 2023 18:12:56 GMT</pubDate>
    <dc:creator>klim</dc:creator>
    <dc:date>2023-10-06T18:12:56Z</dc:date>
    <item>
      <title>Using a token to dynamically set the window parameter in streamstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660024#M54332</link>
      <description>&lt;P&gt;I can't seem to be able to set a variable or a token to the window parameter in the streamstats command.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| streamstats avg(count) as avg_count window=$window_token$&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;| eval c = 2
| streamstats avg(count) as avg_count window=c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the error saying the option value is not an integer. Seems it doesn't take the value of the variable/token. Is there any way to change the parameter dynamically?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Invalid option value. Expecting a 'non-negative integer' for option 'window'. Instead got 'c'."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 18:12:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660024#M54332</guid>
      <dc:creator>klim</dc:creator>
      <dc:date>2023-10-06T18:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to dynamically set the window parameter in streamstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660025#M54333</link>
      <description>&lt;P&gt;These are two different issues. Tokens in dashboard get filled before the search is dispatched so if you have error in such case, there is probably something wrong with your token.&amp;nbsp; Post your xml so we can see.&lt;/P&gt;&lt;P&gt;The other thing - it doesn't work like that. Eval sets a value for processed results. It's not a "variable" that can be passed to another part of the pipeline. There are some dynamic searching techniques in splunk but this is not it and it's not your main problem here I think.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 18:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660025#M54333</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2023-10-06T18:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using a token to dynamically set the window parameter in streamstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660026#M54334</link>
      <description>&lt;P&gt;Looking at it again the token is working. The search was waiting for other tokens to be populated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 18:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-token-to-dynamically-set-the-window-parameter-in/m-p/660026#M54334</guid>
      <dc:creator>klim</dc:creator>
      <dc:date>2023-10-06T18:33:16Z</dc:date>
    </item>
  </channel>
</rss>

