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!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Introducing the 2026 - 2027 SplunkTrust cohort!

The goal of the SplunkTrust™ membership has historically been to acknowledge and recognize those who go above ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...