Splunk Search

Extracting multiple IP address (and other fields) from a single event

kbantoft
Engager

I've got data coming in, looking like:

Jul 10 21:29:33 74.117.145.130 sdpd[3899]: [sdpd.INFO]: ext_host_stat is 173.227.93.102-:771547-:10//207.171.163.133-:1753929-:40//207.171.163.196-:347413-:20//173.194.70.95-:129117-:10//173.194.35.128-:364006-:30//193.227.146.1-:248169-:30//205.251.242.102-:922330-:130//129.33.19.137-:1509784-:260//167.206.5.250-:491601-:100//216.137.59.250-:179654-:40//::203.126.153.151-:4721062-:130//72.21.214.50-:22718-:10//129.33.19.137-:577394-:260//207.171.163.196-:42263-:20//173.227.93.102-:17415-:10//216.9.242.88-:80889-:50//68.142.101.254-:158175-:120//10.10.47.162-:393238-:300//94.245.117.45-:8990-:10//50.115.127.37-:209218-:240//

And I need to extract all of the IP addresses, and the paired data (i.e.: 173.227.93.102-:771547-:10 should become IP address, data, duration). I can do with with rex's, but I only get the 1st occurrence... and the number of occurrences varies. Looking for how to extract the IP/data/duration and pop it into a table.

Tags (2)
0 Karma

josknigh
Engager

User the max_match option for rex

use rex max_match=100 ( your regular expression )

Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...