<?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: Timechart/chart for getting the count of events with specified field value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349499#M170195</link>
    <description>&lt;P&gt;the &lt;CODE&gt;timechart&lt;/CODE&gt; needs the &lt;CODE&gt;_time&lt;/CODE&gt; field, you are stripping it with your &lt;CODE&gt;stats&lt;/CODE&gt; try to add it after the &lt;CODE&gt;by&lt;/CODE&gt; clause&lt;BR /&gt;
as a side note, no need to &lt;CODE&gt;rename&lt;/CODE&gt; here and in general, try to do so (and other cosmetics) at the end of the query for better performance. lastly, the function is &lt;CODE&gt;values&lt;/CODE&gt; not &lt;CODE&gt;value&lt;/CODE&gt;&lt;BR /&gt;
try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=servers sourcetype=xs_json Name=web url=www.google.com/something 
| stats  count(eval(dby.msg="HTTP Request Exceeded SLA")) as EXCEEDED count(eval(bdy.msg="HttpRequest")) as REQUEST by host _time
 | eval Ratio=EXCEEDED/REQUEST 
 | timechart span=15m values(Ratio) by host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
    <pubDate>Thu, 19 Apr 2018 03:03:09 GMT</pubDate>
    <dc:creator>adonio</dc:creator>
    <dc:date>2018-04-19T03:03:09Z</dc:date>
    <item>
      <title>Timechart/chart for getting the count of events with specified field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349496#M170192</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;

&lt;P&gt;I want a graph which actually gives me a ratio of count of events by host grouped together in a 15 minute interval for last 24 hours.&lt;/P&gt;

&lt;P&gt;I have written a query like this &lt;CODE&gt;index=servers sourcetype=xs_json Name=web  url=www.google.com/something | rename bdy.msg as msg | chart span=15m count(eval(msg="HTTP Request Exceeded SLA")) as EXCEEDED count(eval(msg="HttpRequest")) as REQUEST by host | eval Ratio=EXCEEDED/REQUEST | fields - EXCEEDED - REQUEST&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;This gives me a graph, but i want the bars(for each host) to be grouped together for every 15 minutes interval. Any thoughts?? &lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 22:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349496#M170192</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-04-18T22:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart/chart for getting the count of events with specified field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349497#M170193</link>
      <description>&lt;P&gt;Please use trellis visualization  to accomplish the requirement &lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2018 23:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349497#M170193</guid>
      <dc:creator>ssadanala1</dc:creator>
      <dc:date>2018-04-18T23:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart/chart for getting the count of events with specified field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349498#M170194</link>
      <description>&lt;P&gt;I want time to be on X-axis and ratio on y-axis. with the above query I am getting host on x-axis and Ratio on y.  &lt;/P&gt;

&lt;P&gt;Also when I use the below query it doesn't give any stats :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=servers sourcetype=xs_json Name=web url=www.google.com/something | rename bdy.msg as msg | stats  count(eval(msg="HTTP Request Exceeded SLA")) as EXCEEDED count(eval(msg="HttpRequest")) as REQUEST by host | eval Ratio=EXCEEDED/REQUEST | fields - EXCEEDED - REQUEST | timechart value(Ratio) by host 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Apr 2018 01:07:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349498#M170194</guid>
      <dc:creator>macadminrohit</dc:creator>
      <dc:date>2018-04-19T01:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart/chart for getting the count of events with specified field value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349499#M170195</link>
      <description>&lt;P&gt;the &lt;CODE&gt;timechart&lt;/CODE&gt; needs the &lt;CODE&gt;_time&lt;/CODE&gt; field, you are stripping it with your &lt;CODE&gt;stats&lt;/CODE&gt; try to add it after the &lt;CODE&gt;by&lt;/CODE&gt; clause&lt;BR /&gt;
as a side note, no need to &lt;CODE&gt;rename&lt;/CODE&gt; here and in general, try to do so (and other cosmetics) at the end of the query for better performance. lastly, the function is &lt;CODE&gt;values&lt;/CODE&gt; not &lt;CODE&gt;value&lt;/CODE&gt;&lt;BR /&gt;
try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=servers sourcetype=xs_json Name=web url=www.google.com/something 
| stats  count(eval(dby.msg="HTTP Request Exceeded SLA")) as EXCEEDED count(eval(bdy.msg="HttpRequest")) as REQUEST by host _time
 | eval Ratio=EXCEEDED/REQUEST 
 | timechart span=15m values(Ratio) by host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2018 03:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-chart-for-getting-the-count-of-events-with-specified/m-p/349499#M170195</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-04-19T03:03:09Z</dc:date>
    </item>
  </channel>
</rss>

