Splunk Search

tstats behaviour change in Splunk 6.6, expected change or bug ?

guilmxm
Influencer

Hi !

Splunk 6.6 being out officially, I had the (bad) surprise to discover is very annoying change in tstats command behaviour.

Doing an operation over a non existing field result in a "nan" value instead of a null field.

The following search can be used to demonstrate:

| tstats count as count max(foo) as foo WHERE index=_internal

With 6.5.3 and previous, the result would have been:alt text

Since 6.6, it is now: alt text

So in what could be a problem ? Well it changes the behaviour on any condition using an "isnull" or "isnotnull" condition, such as:

| tstats count as count max(foo) as foo WHERE index=_internal
| eval good=if(isnotnull(foo), foo, count)

Would now use the "bad" value instead of the "good" value, because it is not null any more as it now equals to the "nan" string.
Off course, the query can be changed to something like:

| tstats count as count max(foo) as foo WHERE index=_internal
| eval good=if(isnum(foo), foo, count)

This is however a serious change in the tstats behaviours, and has side effects on any stuff doing such job and assuming that the field will be null if it is not available in the data.

Is that an expected change ? A bug ?

Thanks!

1 Solution

guilmxm
Influencer

This issue has been fixed with Splunk maintenance release 6.6.1 (SPL-141863, SPL-141584)

View solution in original post

guilmxm
Influencer

This issue has been fixed with Splunk maintenance release 6.6.1 (SPL-141863, SPL-141584)

mattymo
Splunk Employee
Splunk Employee

Happy to have that one in my Jira scrapbook! 😉

Thanks for finding it early and reporting @guilmxm

alt text

- MattyMo
0 Karma

guilmxm
Influencer

And more than happy to contribute to the quality of Splunk 😉

gjanders
SplunkTrust
SplunkTrust
0 Karma

guilmxm
Influencer

A typo off course, thank you 😉

Corrected.

0 Karma

mattymo
Splunk Employee
Splunk Employee

Thanks as always for your rockstar work, Guilhem!

I have filed a bug and made internal devs aware. Stay tuned!

- MattyMo
0 Karma

jkat54
SplunkTrust
SplunkTrust

I'm going with bug. I've seen nans before and it wa always my fault and not expected 😉

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...