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!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...