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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...