<?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: How to develop a timechart by host with eval command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215927#M63331</link>
    <description>&lt;P&gt;Thanks! it works!&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2016 19:54:12 GMT</pubDate>
    <dc:creator>kualo</dc:creator>
    <dc:date>2016-09-28T19:54:12Z</dc:date>
    <item>
      <title>How to develop a timechart by host with eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215925#M63329</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have the below search to find the SLA of my application &lt;STRONG&gt;by host&lt;/STRONG&gt; in the specific time span.&lt;BR /&gt;
But I don't know why it won't show up SLA&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | timechart span=30m count as VOLUME count(eval(respTime&amp;lt;=10)) as COUNT by host | eval SLA=COUNT/VOLUME*100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to show SLA and VOLUME together in the line graph so I tried below but it didn't work&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | timechart span=30m count as VOLUME count(eval(respTime&amp;lt;=10)) as COUNT by host | eval SLA=COUNT/VOLUME*100 | fields + _time VOLUME SLA
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone help? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 15:54:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215925#M63329</guid>
      <dc:creator>kualo</dc:creator>
      <dc:date>2016-09-28T15:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a timechart by host with eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215926#M63330</link>
      <description>&lt;P&gt;The problem here is that when you use the timechart ( or chart command) with a by clause, the field name that you're going to see will be &lt;CODE&gt;_time&lt;/CODE&gt; and &lt;CODE&gt;VOLUME: host1&lt;/CODE&gt;, &lt;CODE&gt;VOLUME: host2&lt;/CODE&gt;.... and &lt;CODE&gt;COUNT: host1&lt;/CODE&gt;, &lt;CODE&gt;COUNT: host2&lt;/CODE&gt;.... So when you're doing a SLA calculation, the field that you refer (plain COUNT and VOLUME) doesn't exist and hence it's not shown in the graph. In fact, if you check the legend of your line chart, you can see the name of the series will be similar to what I mentioned earlier. &lt;/P&gt;

&lt;P&gt;If you want to show to total VOLUME and SLA for each host in a timechart, try like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;some search | bucket span=30m _time | stats count as VOLUME count(eval(respTime&amp;lt;=10)) as COUNT by _time host | eval SLA=COUNT*100/VOLUME | timechart values(VOLUME) as VOLUME values(SLA) as SLA by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again, as mentioned earlier, you'd get fields like &lt;CODE&gt;_time VOLUME:host1 VOLUME:host2... SLA:host1 SLA:host2...&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 17:47:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215926#M63330</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-28T17:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a timechart by host with eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215927#M63331</link>
      <description>&lt;P&gt;Thanks! it works!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2016 19:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215927#M63331</guid>
      <dc:creator>kualo</dc:creator>
      <dc:date>2016-09-28T19:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to develop a timechart by host with eval command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215928#M63332</link>
      <description>&lt;P&gt;This is exactly what I was looking for! Now, to what I believe is the easy part, I wanted to add a constant red line, indicating the SLA limit. I tried placing &lt;CODE&gt;eval sla=99&lt;/CODE&gt; , but it never shows.&lt;/P&gt;</description>
      <pubDate>Sun, 02 Oct 2016 05:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-develop-a-timechart-by-host-with-eval-command/m-p/215928#M63332</guid>
      <dc:creator>badamastor</dc:creator>
      <dc:date>2016-10-02T05:55:53Z</dc:date>
    </item>
  </channel>
</rss>

