Splunk Search

How to remove null entries from search results?

Aj01
Path Finder

i have been using this query but couldn't be able to remove null rows, please help me

index=Window_wash

| rex field=_raw "TIME.TAKEN.FOR.(?<Vendor>\w+)"
| rex field=_raw (?<Time_MS>\d+).ms
| timechart span=1m max(Time_MS) as Time_MS
| outlier Time_MS

 

 

Labels (3)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Aj01,

did you tried with the where command?

index=Window_wash
| rex field=_raw "TIME.TAKEN.FOR.(?<Vendor>\w+)"
| rex field=_raw (?<Time_MS>\d+).ms
| timechart span=1m max(Time_MS) AS Time_MS
| where Time_MS>0
| outlier Time_MS

Ciao.

Giuseppe

View solution in original post

Aj01
Path Finder

Hi @gcusello 

Thanks for helping, it worked i was using where Time_MS=* or Time_MS!=null but this worked

Thankyou

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Aj01,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Aj01,

did you tried with the where command?

index=Window_wash
| rex field=_raw "TIME.TAKEN.FOR.(?<Vendor>\w+)"
| rex field=_raw (?<Time_MS>\d+).ms
| timechart span=1m max(Time_MS) AS Time_MS
| where Time_MS>0
| outlier Time_MS

Ciao.

Giuseppe

pstout2
Loves-to-Learn

Remember, search is used to compare fields to literals whereas where is used to compare fields to fields or expressions.

Sometimes both work. Sometimes not.

| search Time_MS>0
| where isnotnull(Time_MS)

 

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...