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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...