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!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...