Splunk Search

Ignore null values

jackpal
Path Finder

I am using the nix agent to gather disk space.  I only collect "df" information once per day. I want to be able to present a statistics table that only shows the rows with values.  When I do the query below I get alot of empty rows.  I'd like to only show the rows with data.

index=os sourcetype=df host=hostname filesystem=*mapper*lim*
| eval LIM_PROD_DISK=case(
filesystem LIKE "%limproda1%", "limproda1",
filesystem LIKE "%limproda2%", "limproda2",
filesystem LIKE "%limprodwide0%", "limprodwide0",
filesystem LIKE "%limprodwide1%", "limprodwide1",
filesystem LIKE "%limprodwide2%", "limprodwide2",
filesystem LIKE "%limtoolsvol%", "limptoolsvol"
)
| bin _time span=1d
| timechart max(storage_used_percent) by LIM_PROD_DISK

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The timechart command has the cont option for that.  Try 

index=os sourcetype=df host=hostname filesystem=*mapper*lim*
| eval LIM_PROD_DISK=case(
filesystem LIKE "%limproda1%", "limproda1",
filesystem LIKE "%limproda2%", "limproda2",
filesystem LIKE "%limprodwide0%", "limprodwide0",
filesystem LIKE "%limprodwide1%", "limprodwide1",
filesystem LIKE "%limprodwide2%", "limprodwide2",
filesystem LIKE "%limtoolsvol%", "limptoolsvol"
)
| bin _time span=1d
| timechart cont=f max(storage_used_percent) by LIM_PROD_DISK

 

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

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

The timechart command has the cont option for that.  Try 

index=os sourcetype=df host=hostname filesystem=*mapper*lim*
| eval LIM_PROD_DISK=case(
filesystem LIKE "%limproda1%", "limproda1",
filesystem LIKE "%limproda2%", "limproda2",
filesystem LIKE "%limprodwide0%", "limprodwide0",
filesystem LIKE "%limprodwide1%", "limprodwide1",
filesystem LIKE "%limprodwide2%", "limprodwide2",
filesystem LIKE "%limtoolsvol%", "limptoolsvol"
)
| bin _time span=1d
| timechart cont=f max(storage_used_percent) by LIM_PROD_DISK

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...