Splunk Search

Using fillnull_value or fillnull value with Tstats

Godspeed_74
Loves-to-Learn Lots

I am trying to fill the null values and using a datamodel. I want to use tstats and fill null values will "Null" using fillnull. How should I use it with tstats? 

Labels (5)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Could you please tell us more about the problem you are trying to solve?  The tstats command does not have a 'fillnull' option.  Recall that tstats works off the tsidx files, which IIRC does not store null values.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Godspeed_74
Loves-to-Learn Lots

According to the Tstats documentation, we can use fillnull_values which takes in a string value. I tired using that, but it didn't work. 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please share your query.

---
If this reply helps you, Karma would be appreciated.
0 Karma

Godspeed_74
Loves-to-Learn Lots

trying to use this
| tstats summariesonly=true allow_old_summaries=true fillnull_value="NULL" count FROM datamodel=Linux_System.Linux_System  WHERE (Linux_System.src_host=*) by src_host

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Do you have src_host fields with null values?

---
If this reply helps you, Karma would be appreciated.
0 Karma

Godspeed_74
Loves-to-Learn Lots

Yes, it has null values. 

0 Karma
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...