<?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 Schedule report with variable field in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Schedule-report-with-variable-field/m-p/497947#M7976</link>
    <description>&lt;P&gt;First and foremost: maybe what I'm looking for isn't possible or I'm going down the wrong road, in which case, please enlighten me.&lt;/P&gt;

&lt;P&gt;So say we have search:&lt;/P&gt;

&lt;P&gt;index=my_index my_field1=* | timechart my_field2&lt;/P&gt;

&lt;P&gt;I can add this search to a dashboard and make it so, that with a dropdown list I can select what my_field1 will be.  So I can generate a result overall, or a specific selection of it.&lt;BR /&gt;
Now this search takes a while, so I thought I'd schedule it.  This works, but the substition is not scheduled.  So in other words, if I use the result in the dashboard, my search result remains "my_field1=*", no matter the substition from the dropdown list.&lt;/P&gt;

&lt;P&gt;Is there an easy way to schedule all possible outcomes for this search? (they are fixed, so a lookup table for the values is an option)&lt;BR /&gt;
Or do I need to look at other mechanisms to speed up the search, and if so, which would that be?&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;BR /&gt;
Herman&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:28:50 GMT</pubDate>
    <dc:creator>splunkuzleuven</dc:creator>
    <dc:date>2020-09-30T02:28:50Z</dc:date>
    <item>
      <title>Schedule report with variable field</title>
      <link>https://community.splunk.com/t5/Reporting/Schedule-report-with-variable-field/m-p/497947#M7976</link>
      <description>&lt;P&gt;First and foremost: maybe what I'm looking for isn't possible or I'm going down the wrong road, in which case, please enlighten me.&lt;/P&gt;

&lt;P&gt;So say we have search:&lt;/P&gt;

&lt;P&gt;index=my_index my_field1=* | timechart my_field2&lt;/P&gt;

&lt;P&gt;I can add this search to a dashboard and make it so, that with a dropdown list I can select what my_field1 will be.  So I can generate a result overall, or a specific selection of it.&lt;BR /&gt;
Now this search takes a while, so I thought I'd schedule it.  This works, but the substition is not scheduled.  So in other words, if I use the result in the dashboard, my search result remains "my_field1=*", no matter the substition from the dropdown list.&lt;/P&gt;

&lt;P&gt;Is there an easy way to schedule all possible outcomes for this search? (they are fixed, so a lookup table for the values is an option)&lt;BR /&gt;
Or do I need to look at other mechanisms to speed up the search, and if so, which would that be?&lt;/P&gt;

&lt;P&gt;Kind regards,&lt;BR /&gt;
Herman&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:28:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Schedule-report-with-variable-field/m-p/497947#M7976</guid>
      <dc:creator>splunkuzleuven</dc:creator>
      <dc:date>2020-09-30T02:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Schedule report with variable field</title>
      <link>https://community.splunk.com/t5/Reporting/Schedule-report-with-variable-field/m-p/497948#M7977</link>
      <description>&lt;P&gt;Hi splunkuzleuven,&lt;BR /&gt;
you should use summary indexes:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;schedule your search choosing a time period and a span adeguate to your needs;&lt;/LI&gt;
&lt;LI&gt;add to you search the row &lt;CODE&gt;| collect index=my_summary&lt;/CODE&gt; ;&lt;/LI&gt;
&lt;LI&gt;then use the new summary index for your searches as a database table.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;the search to schedule (e.g. every hour) will be something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index my_field1=* earliest=-h@h latest=@h
| timechart count BY my_field2 span=1h
| collect index=my_summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then you can run something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_summary earliest=7d latest=now
| timechart sum(count) AS Total BY $my_token$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way you can use in your dashboard the results of your report (your scheduled search) that's very quick and you can pass tokens to it.&lt;/P&gt;

&lt;P&gt;Analyze the collect command to understand if there are any additional options useful for you.&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Oct 2019 12:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Schedule-report-with-variable-field/m-p/497948#M7977</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-10-04T12:58:09Z</dc:date>
    </item>
  </channel>
</rss>

