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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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