Splunk Search

How would I extract number from text message?

user33
Path Finder

Hello,

I would like to extract the 10 milliseconds in the below snippet of text as a separate value in a field. Is there anyway to do this? Thank you!!

user33_0-1664756353715.png

2022-10-02T12:56:40.073Z [BillingExecutors-4] INFO com...els.kafka.ElsKafkaReceiver - Message processing time at event aggregator in milli seconds 10

2022-10-02T12:56:40.073Z [BillingExecutors-4] INFO com...els.kafka.ElsKafkaReceiver - Message processing time at event aggregator in milli seconds 10

Labels (2)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust
your_search...
| rex "milli seconds (?<millis>\d+)

will extract a new field called millis from the _raw field based on that regex pattern in the rex statement

View solution in original post

0 Karma

bowesmana
SplunkTrust
SplunkTrust
your_search...
| rex "milli seconds (?<millis>\d+)

will extract a new field called millis from the _raw field based on that regex pattern in the rex statement

0 Karma

user33
Path Finder

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