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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...