<?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: Finding when difference between servers greater than 50% in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684070#M233536</link>
    <description>&lt;P&gt;The query returns no results because the &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; command requires the _time field, but that field was removed by the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command on line 2.&lt;/P&gt;&lt;P&gt;The fix is to include _time in the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=OMITTED source=OMITTED host="SERVER1" OR host="SERVER2"
| bin span=1d _time
| stats max(Value) as Value by host, _time
| eventstats ...
| timechart span=1d avg(value_percentage_difference)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Adjust the &lt;FONT face="courier new,courier"&gt;span&lt;/FONT&gt; option in the &lt;FONT face="courier new,courier"&gt;bin&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; commands to preference.&amp;nbsp; Make sure they match.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Apr 2024 17:50:07 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2024-04-12T17:50:07Z</dc:date>
    <item>
      <title>Finding when difference between servers greater than 50%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684068#M233535</link>
      <description>&lt;P&gt;I am using the below query (server names replaced) to find when there is a greater than 50% difference in volume between 2 call routers (servers). For some reason im getting no timechart results, even when setting the difference to 1% which should always return results.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=OMITTED source=OMITTED host="SERVER1" OR host="SERVER2"
| stats max(Value) as Value by host
| eventstats max(if(host='SERVER1', Value, null)) as server1_value max(if(host='SERVER2', Value, null)) as server2_value
| eval value_difference = abs(server1_value - server2_value)
| eval value_percentage_difference = if(coalesce(server1_value, server2_value) != 0, (value_difference / coalesce(server1_value, server2_value) * 100), 0)
| where value_percentage_difference &amp;gt; 1
| timechart avg(value_percentage_difference)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 Apr 2024 18:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684068#M233535</guid>
      <dc:creator>Adacats</dc:creator>
      <dc:date>2024-04-12T18:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Finding when difference between servers greater than 50%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684070#M233536</link>
      <description>&lt;P&gt;The query returns no results because the &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; command requires the _time field, but that field was removed by the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command on line 2.&lt;/P&gt;&lt;P&gt;The fix is to include _time in the &lt;FONT face="courier new,courier"&gt;stats&lt;/FONT&gt; command, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=OMITTED source=OMITTED host="SERVER1" OR host="SERVER2"
| bin span=1d _time
| stats max(Value) as Value by host, _time
| eventstats ...
| timechart span=1d avg(value_percentage_difference)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Adjust the &lt;FONT face="courier new,courier"&gt;span&lt;/FONT&gt; option in the &lt;FONT face="courier new,courier"&gt;bin&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;timechart&lt;/FONT&gt; commands to preference.&amp;nbsp; Make sure they match.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 17:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684070#M233536</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-04-12T17:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Finding when difference between servers greater than 50%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684077#M233537</link>
      <description>&lt;P&gt;hmm i might be doing something wrong still as i get the timechart but the results are all zeros and there should be a couple at least above zero&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2024 18:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684077#M233537</guid>
      <dc:creator>Adacats</dc:creator>
      <dc:date>2024-04-12T18:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: Finding when difference between servers greater than 50%</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684173#M233555</link>
      <description>&lt;P&gt;Note you need to place&amp;nbsp;source=OMITTED host="SERVER1" OR host="SERVER2" in parentheses; alternatively use IN operator. &amp;nbsp;Finding difference should not be that complicated.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal earliest=-15mindex=OMITTED source=OMITTED host IN ("SERVER1", "SERVER2")
| stats max(Value) as Value by host
| stats max(Value) as max_of_two min(Value) as min_of_two
| where max_of_two / min_of_two &amp;gt; 0.75 &lt;/LI-CODE&gt;&lt;P&gt;However, your OP says you want timechart. &amp;nbsp;That's why&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;includes _time in groupby in that first stats. &amp;nbsp;But you can substitute the first stats with timechart to simplify this, then use the same technique in every row to find percent deviation.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal earliest=-15mindex=OMITTED source=OMITTED host IN ("SERVER1", "SERVER2")
| timechart span=1d max(Value) as Value by host
| eventstats max(Value) as max_of_two min(Value) as min_of_two
| where max_of_two / min_of_two &amp;gt; 0.75 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Apr 2024 00:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-when-difference-between-servers-greater-than-50/m-p/684173#M233555</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-04-14T00:55:53Z</dc:date>
    </item>
  </channel>
</rss>

