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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...