Splunk Search

how to expand multiple ip addresses on more fields?

francesco1g
Engager

Hi, i have more ip address in a field like this:

host |     IP              

h1         10.0.2.2; 10.0.2.1

h2         10.0.2.3; 10.0.1.1

h3         10.2.2.2

 

I want expand the IP field like this

h1 10.0.2.2

h1 10.0.2.1

h2 10.0.2.3

h2 10.0.1.1

h3 10.2.2.2

 

is there a way to produce a result like this?

 

Thanks

Labels (1)
0 Karma
1 Solution

ashvinpandey
Contributor

@francesco1g Use the below command (use your field name instead of ip):

| eval ip=split(ip,";") 
| mvexpand ip

Also, If this reply helps you, an upvote would be appreciated.

View solution in original post

ashvinpandey
Contributor

@francesco1g Use the below command (use your field name instead of ip):

| eval ip=split(ip,";") 
| mvexpand ip

Also, If this reply helps you, an upvote would be appreciated.

Get Updates on the Splunk Community!

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...