Splunk Search

regex question

fuster_j
Path Finder

I'm having problem extracting field below. I'm trying to extract "count_r5=" but the Interactive Field Exaction is grabing everything in field #7 which has other data I don't want: (?i)^(?:[^ ]* ){7}(?P[^ ]+)

05/Jun/2012:15:36:00 count_total=2162 count_r1=759 count_r2=755 count_r3=280 count_r4=218 count_r5=150 count_active=448

I can do it in the search line: rex field=_raw \"count_r5=(?.+)\". How would I go about saving it?

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

Why do you need to use the IFX, aren't the fields (in simple "key=value" format) not being automatically extracted for you ?

Why happens if you just search :

index=yourindex sourcetype=yoursourcetype | table count_r5

sdaniels
Splunk Employee
Splunk Employee

You should be able to edit what the Field Extractor gives you for regex. You can easily replace your regex there. Or after the fact you'll find that in props.conf. Look for the EXTRACT of that field name and modify it there. I think it will put it in SPLUNK_HOME/etc/users///local/props.conf.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...