<?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: Using a sparkline with tstats in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303381#M19343</link>
    <description>&lt;P&gt;The sparkline(sum(count)) bit was the trick! Adding the span and time piece in the sparkline arguments isn't specifically needed though certainly they have their place. Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2017 17:23:43 GMT</pubDate>
    <dc:creator>Runals</dc:creator>
    <dc:date>2017-02-14T17:23:43Z</dc:date>
    <item>
      <title>How to use a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303378#M19340</link>
      <description>&lt;P&gt;I'd like to use a sparkline for quick volume context in conjunction with a tstats command because of its speed. If the following works&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;index=foo | stats sparkline
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would have assumed this would work as well&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=foo by _time | stats sparkline
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've tried a few variations of the tstats command. In the end what I generally get is a straight line which I'm interpreting to mean it is showing me there is a 'count' event for that time. If I use span in the tstats 'by' command the straight line becomes jagged but consistently so.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 04:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303378#M19340</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2022-03-24T04:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303379#M19341</link>
      <description>&lt;P&gt;Do you see anything different if you add &lt;CODE&gt;span=1h&lt;/CODE&gt; or some other  relevant span increment to the &lt;CODE&gt;tstats&lt;/CODE&gt; search  command?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 14:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303379#M19341</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-02-14T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303380#M19342</link>
      <description>&lt;P&gt;If you specify the span in tstats, as well as adding specifics to the sparkline command, I think you'll have better luck.  Here is an example search for the past 24 hours:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=foo by _time span=10m | stats sparkline(sum(count), 10m) as Volume
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Because | tstats returns tabled results instead of events, the default for sparkline just shows a count of 1 for each row.  By specifying a sum for count, you should get better results.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 14:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303380#M19342</guid>
      <dc:creator>justinatpnnl</dc:creator>
      <dc:date>2017-02-14T14:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303381#M19343</link>
      <description>&lt;P&gt;The sparkline(sum(count)) bit was the trick! Adding the span and time piece in the sparkline arguments isn't specifically needed though certainly they have their place. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 17:23:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303381#M19343</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2017-02-14T17:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303382#M19344</link>
      <description>&lt;P&gt;No problem, glad I could help!  I like adding the time elements in to make sure I get what I'm expecting, but certainly not required.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 17:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/303382#M19344</guid>
      <dc:creator>justinatpnnl</dc:creator>
      <dc:date>2017-02-14T17:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/535157#M36494</link>
      <description>&lt;P&gt;If you already have your tstats command outputting the format of events you want, you can just tack on this to the tstats command if you don't already have a BY clause:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;by _time span=10m
| eventstats sparkline(sum(count), 10m)
| fields - _time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you already do have a BY clause, just tack on the _time field and span argument. Then your results will have a sparkline just like as above, except that you don't need to change your tstats to use prestats or any other changes to avoid a double-transforming command.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jan 2021 08:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/535157#M36494</guid>
      <dc:creator>haraksin</dc:creator>
      <dc:date>2021-01-08T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using a sparkline with tstats</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/590552#M48471</link>
      <description>&lt;P&gt;This is what I needed for making a sparkline on a Single Value visualization.&amp;nbsp; Worked very well!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 02:18:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-use-a-sparkline-with-tstats/m-p/590552#M48471</guid>
      <dc:creator>joshuapetitt</dc:creator>
      <dc:date>2022-03-24T02:18:12Z</dc:date>
    </item>
  </channel>
</rss>

