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 is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...