Splunk Search

How to create a rex for search?

super_virus
New Member

I have the below log line:
Slow GraphQL query [8447ms]

How can I grab only the value "8447"?

Tags (2)
0 Karma

cpetterborg
SplunkTrust
SplunkTrust

Search-time? Index-time? Are all the events similar? Is that the whole event?

If you just want a search-time rex way with the example data being the whole event:

... | rex "\[(?P<ms>\d+)ms\]"

If it isn't the entire event, then use the field=yourfieldname option to the rex command.

0 Karma

PowerPacked
Builder

Hi

Please find the following imagealt text

0 Karma
Get Updates on the Splunk Community!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...