Splunk Search

Only show logs where field value has a decimal place

bcarr12
Path Finder

Hi all,

I'm trying to run a search that only finds specific events in a log which have field X equal to a number with a decimal place. Creating the search of simply X>0 returns all log events with any number, which is a good start. Now I'm just looking to filter the results a bit more so only logs having field X equal to any number that has a decimal place will be displayed. What would be the best way to accomplish this?

Thanks.

0 Karma
1 Solution

DalJeanis
Legend

This searches for a period anywhere in field myfield, and drops all records that do not have one.

| regex myfield="\."

View solution in original post

0 Karma

DalJeanis
Legend

This searches for a period anywhere in field myfield, and drops all records that do not have one.

| regex myfield="\."
0 Karma

bcarr12
Path Finder

This is exactly what I needed. Thank you!

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 ...