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 )

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Splunk App Dev Quarterly Roundup: AI, Agents, and Innovation!

Another quarter, another wave of innovation. From complex integrations to pushing the limits ...

Federated Search for Dynamic Data Self Storage Is Now Generally Available on Splunk ...

 Splunk is excited to announce the General Availability of Federated Search for Dynamic Data Self Storage ...

Index This | What has many keys but can’t unlock a door?

July 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...