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!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...