Splunk Search

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

guilmxm
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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

View solution in original post

guilmxm
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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

gjanders
SplunkTrust
SplunkTrust
0 Karma

guilmxm
SplunkTrust
SplunkTrust

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...