<?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: Why does 'x.y'-1 return no value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235213#M69867</link>
    <description>&lt;P&gt;That also yields blank values for latest(ewma).&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2015 18:09:46 GMT</pubDate>
    <dc:creator>j6white</dc:creator>
    <dc:date>2015-09-24T18:09:46Z</dc:date>
    <item>
      <title>Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235211#M69865</link>
      <description>&lt;P&gt;I have an extremely simple search that inexplicably does not work. It returns blank values for latest(ewma):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex msg=instrumentationResults |
eval ewma=('timerStats.ewma'-1) |
timechart limit=0 span=15m latest(ewma)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This also returns blank values for latest(ewma):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex msg=instrumentationResults |
eval ewmaNumMinusOne=('timerStats.ewma'-1) |
convert num(ewmaNumMinusOne) as ewma |
timechart limit=0 span=15m latest(ewma)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This also returns blank values for latest(ewma):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex msg=instrumentationResults |
convert num('timerStats.ewma') as ewmaNum |
eval ewmaNumMinusOne=(ewmaNum-1) |
convert num(ewmaNumMinusOne) as ewma |
timechart limit=0 span=15m latest(ewma)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, this returns lots of numbers for latest(ewma):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex msg=instrumentationResults |
eval ewma=('timerStats.ewma') |
timechart limit=0 span=15m latest(ewma)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/664iCCD43B81521997E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Can anyone explain how to make eval work as expected here?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 15:35:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235211#M69865</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2015-09-24T15:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235212#M69866</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=myIndex msg=instrumentationResults |
 eval ewma=tonumber('timerStats.ewma')-1 |
 timechart limit=0 span=15m latest(ewma)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2015 18:03:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235212#M69866</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-24T18:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235213#M69867</link>
      <description>&lt;P&gt;That also yields blank values for latest(ewma).&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 18:09:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235213#M69867</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2015-09-24T18:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235214#M69868</link>
      <description>&lt;P&gt;This is does seems like conversion issue. Could you try this and see if you see value for ewma column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=myIndex msg=instrumentationResults | head 1 | table "timerStats.ewma" |  eval ewma=tonumber('timerStats.ewma')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex msg=instrumentationResults | head 1 | table "timerStats.ewma" |  eval ewma=tonumber(substr('timerStats.ewma',1,10))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2015 18:51:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235214#M69868</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-24T18:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235215#M69869</link>
      <description>&lt;P&gt;The bizarre results of both queries:&lt;/P&gt;

&lt;P&gt;1106445.3503729277&lt;BR /&gt;
   1106445.3503729277&lt;/P&gt;

&lt;P&gt;Note that EACH query returns BOTH of those values in the timerStats.ewma column!&lt;/P&gt;

&lt;P&gt;Here is the event that is getting borked:&lt;/P&gt;

&lt;P&gt;{"name":"myApp","hostname":"myHost","pid":95299,"level":30,"timerName":"sendToClient_Kafka","timerStats":{"ewma":1106445.3503729277,"min":585249,"max":50912895079,"lastPublish":[39357007,36446006]},"msg":"instrumentationResults","time":"2015-09-23T03:59:59.990Z","v":0}&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:06:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235215#M69869</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2015-09-24T19:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235216#M69870</link>
      <description>&lt;P&gt;So emwa is blank for both the query?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:08:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235216#M69870</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-24T19:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235217#M69871</link>
      <description>&lt;P&gt;EACH query returns the following result in the timerStats.ewma column:&lt;/P&gt;

&lt;P&gt;1106445.3503729277&lt;BR /&gt;
1106445.3503729277&lt;/P&gt;

&lt;P&gt;That's right. Somehow two identical values are being output from tonumber('timerStats.ewma').&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235217#M69871</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2015-09-24T19:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235218#M69872</link>
      <description>&lt;P&gt;Even simpler, the following also outputs a single column with two identical values:&lt;/P&gt;

&lt;P&gt;index=myIndex msg=instrumentationResults&lt;BR /&gt;
   | head 1 | table "timerStats.ewma"&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235218#M69872</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2015-09-24T19:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235219#M69873</link>
      <description>&lt;P&gt;Ohk.. so the problem is that you've a multivalued field in the equation and that is causing issues with all eval. It will work fine if directly used in Stats/aggregation commands. &lt;BR /&gt;
Since your logs don't have two values for timeStats field, it seems like you've your props.conf/sourcetype definition causing it to be extracted twice. Could you please provide your props.conf for your sourcetype??&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 19:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235219#M69873</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-24T19:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235220#M69874</link>
      <description>&lt;P&gt;The relevant stanza of props.conf:&lt;/P&gt;

&lt;P&gt;[bunyan]&lt;BR /&gt;
TZ = GMT&lt;BR /&gt;
TIMESTAMP_FIELDS = time&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%dT%H:%M:%S.%3NZ&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
category = Structured&lt;BR /&gt;
TRUNCATE = 1000000&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
description = JavaScript Object Notation format. With bunyan timestamp (time) field extraction&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235220#M69874</guid>
      <dc:creator>j6white</dc:creator>
      <dc:date>2020-09-29T07:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why does 'x.y'-1 return no value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235221#M69875</link>
      <description>&lt;P&gt;I would suggest this to add following to your props.conf on Search Head, may need to reload/refresh/restart&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; AUTO_KV_JSON = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This should completely stop doing JSON field extraction as search time as you already have fields extracted during index-time (INDEX_EXTRACTIONS = json). Once you apply this and reloaded the configuration, try your query again.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2015 20:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-x-y-1-return-no-value/m-p/235221#M69875</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-24T20:31:20Z</dc:date>
    </item>
  </channel>
</rss>

