<?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: Simple question about timecharts in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37246#M8288</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;index=firewall | sourcetype=cisco | multikv fields connections | bucket _time span=1h as time | chart sum(connections) over time by node
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you'll probably have to fool around with the span time, but that should do it. &lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2012 19:38:36 GMT</pubDate>
    <dc:creator>RicoSuave</dc:creator>
    <dc:date>2012-04-26T19:38:36Z</dc:date>
    <item>
      <title>Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37245#M8287</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I have a field with values, like 2, 4 or 10.&lt;BR /&gt;
Now I want to use a timechart or a chart which display 2, 4 or 10 in a graph over the time. I struggeling because Splunk always use the event and not the content of the event. &lt;/P&gt;

&lt;P&gt;when I perform a search like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=firewall | sourcetype=cisco | multikv fields connections | timechart avg(connections) by node
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just get average values of the connections - I want to use the real values in the field connections without using any mathematical constructions.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 15:33:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37245#M8287</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-04-26T15:33:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37246#M8288</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=firewall | sourcetype=cisco | multikv fields connections | bucket _time span=1h as time | chart sum(connections) over time by node
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you'll probably have to fool around with the span time, but that should do it. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 19:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37246#M8288</guid>
      <dc:creator>RicoSuave</dc:creator>
      <dc:date>2012-04-26T19:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37247#M8289</link>
      <description>&lt;P&gt;Some explanation on how &lt;CODE&gt;timechart&lt;/CODE&gt; behaves: &lt;CODE&gt;timechart&lt;/CODE&gt; needs some kind of statistical function that returns a unique value for the timespan it's operating on. If you don't define the timespan yourself it will be set dynamically depending on what timerange the whole search spans, but let's take an example where the timespan is 1 minute and that somewhere in your log you have 3 of these events occurring within 1 minute. Splunk needs to know how to give you ONE value for "Value", even though there are 3 values of each. You can tell Splunk to just give you an average from the 3 events using the stats function avg, like you have done:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | timechart span=1m avg(connections) by node
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, if you only want the values from the first of the events within the time period, use &lt;CODE&gt;first&lt;/CODE&gt; instead of &lt;CODE&gt;avg&lt;/CODE&gt;. Want the sum? Use &lt;CODE&gt;sum&lt;/CODE&gt;. And so on. More information on statistical functions is available here: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Stats"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Stats&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;There's also a second way to do this, which is to produce a table containing timestamps and values yourself and then feed them into the chart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table _time connections
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Apr 2012 19:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37247#M8289</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-04-26T19:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37248#M8290</link>
      <description>&lt;P&gt;I think we have a misunderstanding
I want to know how I can use the values IN the field.
for instance, connections=2 at 3 pm and connections=8 at 4 pm.
So I want to have a graph which displays once the connections 2 and 8 over the time 3 and 4 pm.&lt;/P&gt;

&lt;P&gt;For me it is important to display the real numbers in my time chart without having avg etc.&lt;BR /&gt;
I don't need it in a table.&lt;/P&gt;

&lt;P&gt;You know what I mean? &lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 19:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37248#M8290</guid>
      <dc:creator>nebel</dc:creator>
      <dc:date>2012-04-26T19:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37249#M8291</link>
      <description>&lt;P&gt;I know, and that's the problem I'm addressing in my answer. There are two suggested ways of solving it in there - what are your objections to either way?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2012 20:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37249#M8291</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-04-26T20:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37250#M8292</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;I have panels that produce a number using the stat command (stats count | where count=0] | stats count) at the end of each panels calculations with a field that ensures not n/a. What i want to do is show the trend of this number over the last 24 hours or week.  I was considering using trend lines but this may work better. &lt;/P&gt;

&lt;P&gt;So i need some formula that calculates the number of events from  a previous 24 hours i am guessing the avg command and then compares this to current day so i want to see the trends but also want to know if and when this log is not working for some reason. thanks C.  &lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37250#M8292</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2017-07-12T14:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37251#M8293</link>
      <description>&lt;P&gt;This question is more than 5 years old and has an accepted answer so you're unlikely to get an answer.  You should post a new question.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37251#M8293</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-07-12T15:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question about timecharts</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37252#M8294</link>
      <description>&lt;P&gt;thanks Rich i tried that and nobody answered but ill try again thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-question-about-timecharts/m-p/37252#M8294</guid>
      <dc:creator>colinmchugo</dc:creator>
      <dc:date>2017-07-12T16:38:54Z</dc:date>
    </item>
  </channel>
</rss>

