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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

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

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...