<?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 How do I use a sparkline within tstats to visualize data feed over the last 24 hours? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-sparkline-within-tstats-to-visualize-data-feed/m-p/454181#M128506</link>
    <description>&lt;P&gt;I want to use a &lt;CODE&gt;tstats&lt;/CODE&gt; command to get a count of various indexes over the last 24 hours.  I also want to include the latest event time of each index (so I know logs are still coming in) and add to a sparkline to see the trend.&lt;/P&gt;

&lt;P&gt;I'm having trouble as the sparkline is grouping together into one rather than by index.  I referenced &lt;A href="https://answers.splunk.com/answers/500896/using-a-sparkline-with-tstats.html?utm_source=typeahead&amp;amp;utm_medium=newquestion&amp;amp;utm_campaign=no_votes_sort_relev"&gt;this post&lt;/A&gt;, but am stuck.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where (index="email" OR index="b" OR index="ids" OR index="web") BY index _time span=10m
| stats sparkline(sum(count), 10m) AS Volume
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5748i0686B0A2E155B15B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Basically, I'm trying to make a tstats version of this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5749i5807990076811F63/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="a" OR index="b" OR index="c" OR index="d" OR index="e" OR index="f" OR index="g"
| stats sparkline count latest(_time) AS Latest BY index
| convert ctime(Latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Sep 2018 15:00:35 GMT</pubDate>
    <dc:creator>DEAD_BEEF</dc:creator>
    <dc:date>2018-09-11T15:00:35Z</dc:date>
    <item>
      <title>How do I use a sparkline within tstats to visualize data feed over the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-sparkline-within-tstats-to-visualize-data-feed/m-p/454181#M128506</link>
      <description>&lt;P&gt;I want to use a &lt;CODE&gt;tstats&lt;/CODE&gt; command to get a count of various indexes over the last 24 hours.  I also want to include the latest event time of each index (so I know logs are still coming in) and add to a sparkline to see the trend.&lt;/P&gt;

&lt;P&gt;I'm having trouble as the sparkline is grouping together into one rather than by index.  I referenced &lt;A href="https://answers.splunk.com/answers/500896/using-a-sparkline-with-tstats.html?utm_source=typeahead&amp;amp;utm_medium=newquestion&amp;amp;utm_campaign=no_votes_sort_relev"&gt;this post&lt;/A&gt;, but am stuck.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where (index="email" OR index="b" OR index="ids" OR index="web") BY index _time span=10m
| stats sparkline(sum(count), 10m) AS Volume
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5748i0686B0A2E155B15B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Basically, I'm trying to make a tstats version of this:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5749i5807990076811F63/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="a" OR index="b" OR index="c" OR index="d" OR index="e" OR index="f" OR index="g"
| stats sparkline count latest(_time) AS Latest BY index
| convert ctime(Latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Sep 2018 15:00:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-sparkline-within-tstats-to-visualize-data-feed/m-p/454181#M128506</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-11T15:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a sparkline within tstats to visualize data feed over the last 24 hours?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-sparkline-within-tstats-to-visualize-data-feed/m-p/454182#M128507</link>
      <description>&lt;P&gt;I was finally able to figure it out.  Here is the final query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where (index="a" OR index="b" OR index="c" OR index="d" OR index="e" OR index="f" OR index="g") BY index _time span=10m 
| stats sparkline(sum(count), 10m) AS Volume latest(_time) AS Latest BY index 
| convert ctime(Latest)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Sep 2018 15:33:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-sparkline-within-tstats-to-visualize-data-feed/m-p/454182#M128507</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-11T15:33:41Z</dc:date>
    </item>
  </channel>
</rss>

