Splunk Search

How to search for fields that contain numbers

mlevsh
Builder

Hi,
I need to run a search the would select only those events where field Id contains numbers
For example: it can be "bs332cs5-bs3 ", "cd3g54cdd" versus "planner" or "sync"

Tags (1)
0 Karma

woodcock
Esteemed Legend

Like this:

your base search | regex Id="\d"

somesoni2
Revered Legend

Try like this

your base search | regex Id=".*\d+.*"

Alternatively

your base search | where match(Id,"\d")

mlevsh
Builder

@somesoni2 , thank you!

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...