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!

Your Feedback. Our Roadmap. Visit the PX Feedback Booth at .conf26

You use Splunk every day, come and help shape what's next.  Save Your Seat: Product-Focused Sessions at ...

Agentic SOC Triage: Investigating Splunk ES Notables with MCP Server and a Local LLM

The Problem: Too Many Alerts, Too Little Context Security operations teams running Splunk Enterprise Security ...

Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas

Watch Now Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas     Do you ever feel ...