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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...